Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Connect 4 With Amazing AI !!
Index -> Programming, Turing -> Turing Submissions
Goto page 1, 2  Next
View previous topic Printable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Scott




PostPosted: Tue Apr 20, 2010 8:53 am   Post subject: Connect 4 With Amazing AI !!

Hi, this is my first submission.

It is a simple connect four using sprites. Hope you enjoy it.
You can either play another human or try to beat my AI. Goodluck (:
Also I know my AI tries to get four in a row off of the board,
but I have moved on to other things and thought you guys might enjoy this.
Please leave constructive feedback or suggestions.

Thanks, Scott



Connect4.t
 Description:
My connect 4 game. Just hit run.

Download
 Filename:  Connect4.t
 Filesize:  9.75 KB
 Downloaded:  1459 Time(s)

Sponsor
Sponsor
Sponsor
sponsor
Thaviel




PostPosted: Mon May 03, 2010 9:01 am   Post subject: Re: Connect 4 With Amazing AI !!

I love connect 4 with amazing AI!!


+2 bits


Razz


Scott I feel kinda sorry for you. the Computer player is really cool and pretty hard to beat too and you have over 150 downloads and yet no one posts anything about it BooHoo .
qmanjr5




PostPosted: Tue May 18, 2010 10:40 am   Post subject: RE:Connect 4 With Amazing AI !!

I'll download this when I get home, I'm at school right now.

Seems fun Smile
I'll also post when I beat your AI Wink Wink
SNIPERDUDE




PostPosted: Tue May 18, 2010 1:19 pm   Post subject: RE:Connect 4 With Amazing AI !!

I must say, I found it rather hard to beat - so I gave up on it.
Very well done, +bits
A.J




PostPosted: Tue May 18, 2010 4:45 pm   Post subject: RE:Connect 4 With Amazing AI !!

Ah, not bad AI at all. Though my AI beat it 10/10 ! (LOL, no, I am not that self centered...but it is true Laughing)

very good job though + bits
BigBear




PostPosted: Wed May 19, 2010 8:32 pm   Post subject: Re: Connect 4 With Amazing AI !!

Attached is a video of me going 3 times in a row and then at another time going twice in a row, I have recreated this many times and after i go top right corner it always lets me go again and again if I go bottom left but not if I go anywhere else.


Also it doesn't go when I will win the next turn either way.



test - Copy.zip
 Description:
Video of Gameplay (I go three times in a row and computer refuses to let me win :))

Download
 Filename:  test - Copy.zip
 Filesize:  541.52 KB
 Downloaded:  220 Time(s)

Scott




PostPosted: Fri May 21, 2010 9:18 am   Post subject: Re: Connect 4 With Amazing AI !!

Hey, thanks for letting me know about that bug where you can keep going.
Already fixed.
Can you make another movie where the comp wont lose?
I might have fixed it while fixing the other problem.

Anyways here is the update hope you guys enjoy. Keep going at it and letting me know.

Thanks, Scott



Connect4.t
 Description:
Small bug fix.

Download
 Filename:  Connect4.t
 Filesize:  10.16 KB
 Downloaded:  332 Time(s)

BigBear




PostPosted: Fri May 21, 2010 9:50 pm   Post subject: RE:Connect 4 With Amazing AI !!

It was at the end of the video, i go twice before the computer does the last move
Sponsor
Sponsor
Sponsor
sponsor
Unnamed.t




PostPosted: Tue May 25, 2010 6:23 pm   Post subject: Re: Connect 4 With Amazing AI !!

Wow this program is great. And what I think amazing about it is that.... I BEAT YOUR AI ON THE FIRST TRYYY Shocked

Lol after reading all the posts i just thought i was going to lose just like that but it is pretty hard to believe i won.

The board/stadium (what ever u like to call it) looked like this (im X/x and comp is O/o)

* * * * * * * *
* * * * * * * *
* ** * * *o*x**** this may be more visually apealing:::::OX
*** * *x*x*o**** this may be more visually apealing::::XXO
* * *x*x*x*x* ** this may be more visually apealing::::XXXX
* * *o*o*x*o* ** this may be more visually apealing:::OOXO
* *o*x*x*o*o*o* this may be more visually apealing::OXXOOO
supaphreek




PostPosted: Sat May 29, 2010 12:42 pm   Post subject: RE:Connect 4 With Amazing AI !!

this is pretty damn good. i lost several times Razz but then i tied it Very Happy winning is too hard tho Sad

Edit : I WONNN Very Happy



connect4.JPG
 Description:
YAYY :D
 Filesize:  69.7 KB
 Viewed:  266 Time(s)

connect4.JPG


Scott




PostPosted: Fri Jun 04, 2010 11:39 am   Post subject: Re: Connect 4 With Amazing AI !!

Tony - I guess you just understand the correct way of playing connect 4, which is to set up a double win(hint to others).

Supaphreet - Good try and its supposed to be hard, your not supposed to lose to AI, or else it isnt very good AI.

Thanks everyone for the feedback.
A.J




PostPosted: Fri Jun 04, 2010 11:48 am   Post subject: RE:Connect 4 With Amazing AI !!

Your AI plays pretty well. However, it would be a good exercise to try implementing a minimax algorithm (as this game's is pretty small relative to games such as chess where minimax is very useful, it will work nicely). Also, the game Connect 4 has already been solved mathematically by James Allen and Victor Allis. Assuming both players play optimally, player 1 can force a win by going in the center column, player 2 can force a draw if player 1 plays in the two adjacent columns, and player 2 can force a win if player 1 plays in any of the four outer columns.

The following link is Victor Allis' Masters Thesis regarding Connect 4: http://www.connectfour.net/Files/connect4.pdf
Cezna




PostPosted: Fri Jun 04, 2010 2:05 pm   Post subject: RE:Connect 4 With Amazing AI !!

Great game, and very good AI.
Haven't beat it, but I suck at Connect 4, but if by some fluke I do manage to beat it, I will let you know.

Have you considered putting it difficulty settings for when you are playing the computer?
It would probably be pretty hard to code the computer to make realistic but not overly predictable mistakes, but it would be really cool if you could do it.
Cezna




PostPosted: Tue Jun 08, 2010 11:42 am   Post subject: Re: Connect 4 With Amazing AI !!

Beat the AI
It let me go first
I did this (column 1 = farthest left)
column 1
column 4
column 4
column 3
column 2
column 1
column 3



Connect4 win.bmp
 Description:
 Filesize:  770.4 KB
 Viewed:  267 Time(s)

Connect4 win.bmp


Scott




PostPosted: Wed Jun 16, 2010 12:50 pm   Post subject: Re: Connect 4 With Amazing AI !!

Cezna - Thanks and good work. Yes it is a simplistic AI with no foresight at all. It determains it moves at that moment depending on the state of the current board without considering future moves by its oppenent.

A.J - I know it has been solved and I looked into it when I began the AI. I only made this to touch on AI algorithms and expand my knowledge not to create 'skynet'. I have thought about the minimax long before and had already decided to leave that for next year possibly, so look out for a post by me next year (:

Thanks, Scott
Display posts from previous:   
   Index -> Programming, Turing -> Turing Submissions
View previous topic Tell A FriendPrintable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 2  [ 25 Posts ]
Goto page 1, 2  Next
Jump to:   


Style:  
Search: