Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

The 20 Line Challenge / Connect 4 ! With AI!

Author
Message
PiratSS
21
Years of Service
User Offline
Joined: 18th Oct 2002
Location:
Posted: 24th Mar 2003 03:11 Edited at: 26th Mar 2003 03:17
Hello,

this is my second attempt at creating AI in 20 lines.

Here is the code:



Here you can download source/Media:
http://piratss.freewebspace.com

Here is a compiled version of Connect 4.

http://www24.brinkster.com/piratss/Compiled.html

Note: My Board has funny colors for some reason.

Here is a screenshot of Connect 4:
http://www24.brinkster.com/piratss/Screenshot.html

This works for DBC, I am not sure about DBPro,
so if anyone want to give it a try.

Computer AI is not bad, and it was very hard to fit in 20 lines.

1PH J00 C4|\| U|\|dER$T@|\||) +|-|I$, j00 |-|@\/3 4lR3Ady w0|\|! - p1r@T$$
Witch Bomber
21
Years of Service
User Offline
Joined: 25th Jan 2003
Location: Scotland
Posted: 25th Mar 2003 17:41
Have you been continually clicking refresh on this page?

Visit the new Madd Matt Games Website
http://www.madamattgames.o-f.com/index.htm
Home of Witch Bomber,Magic Cube and Pinball Football(and a lame website)
FiShFuN4eVeR
21
Years of Service
User Offline
Joined: 2nd Feb 2003
Location: Netherlands
Posted: 25th Mar 2003 19:48
:-s Why do you ask him that question. Has it anying to do with the AI. Well its a nice pease of codework

We're all Christ and we're all Hitler.We want Christ to win.What would he've done if he had advertisements, T.V. and newspapers?The miracle today is communication.So let's use it.-John Lennon '69
PiratSS
21
Years of Service
User Offline
Joined: 18th Oct 2002
Location:
Posted: 25th Mar 2003 23:43
What is clicking refresh for ? :-s

It kinda took me long.

I will release Compiled and a few screens for othe people.

Did anyone try it in DBPro?

Cheers.

1PH J00 C4|\| U|\|dER$T@|\||) +|-|I$, j00 |-|@\/3 4lR3Ady w0|\|! - p1r@T$$
andrew11
21
Years of Service
User Offline
Joined: 23rd Feb 2003
Location: United States
Posted: 26th Mar 2003 00:02 Edited at: 26th Mar 2003 00:14
I tried it in DBPro. It dosen't work. "Command out of place at line 17". I'll see if I can fix it.

"All programmers are playwrights and all computers are lousy actors." -Anon.

<--- Just.. changed.. my. avatar... Ouch, my head!
PiratSS
21
Years of Service
User Offline
Joined: 18th Oct 2002
Location:
Posted: 26th Mar 2003 00:13
thx a bunch!

Cheers. (Time for me to get Pro )

1PH J00 C4|\| U|\|dER$T@|\||) +|-|I$, j00 |-|@\/3 4lR3Ady w0|\|! - p1r@T$$
PiratSS
21
Years of Service
User Offline
Joined: 18th Oct 2002
Location:
Posted: 26th Mar 2003 03:22
Hey, few updates:

I made a compiled version, a screenshot and put code right here(for those who don't have DB or DBPro)

Cheers.

1PH J00 C4|\| U|\|dER$T@|\||) +|-|I$, j00 |-|@\/3 4lR3Ady w0|\|! - p1r@T$$
Witch Bomber
21
Years of Service
User Offline
Joined: 25th Jan 2003
Location: Scotland
Posted: 26th Mar 2003 18:06
How did you manage to get 720 views???? :-s

Visit the new Madd Matt Games Website
http://www.madamattgames.o-f.com/index.htm
Home of Witch Bomber,Magic Cube and Pinball Football(and a lame website)
Witch Bomber
21
Years of Service
User Offline
Joined: 25th Jan 2003
Location: Scotland
Posted: 26th Mar 2003 18:07
How many of those smileys don't work?
:-s [b]) x-d

Visit the new Madd Matt Games Website
http://www.madamattgames.o-f.com/index.htm
Home of Witch Bomber,Magic Cube and Pinball Football(and a lame website)
PiratSS
21
Years of Service
User Offline
Joined: 18th Oct 2002
Location:
Posted: 27th Mar 2003 02:16 Edited at: 27th Mar 2003 02:16
720 views is alot, i remember i had 600 just few hours before.

Cheers.

1PH J00 C4|\| U|\|dER$T@|\||) +|-|I$, j00 |-|@\/3 4lR3Ady w0|\|! - p1r@T$$
Jonny_S
21
Years of Service
User Offline
Joined: 10th Oct 2002
Location: United Kingdom
Posted: 12th Apr 2003 22:33
Its interesting, and the AI is nicely coded but easily defeated, I took it out, It seems like the AI only calculates how its going to win not how its going to stop the player from winnig, but for 20 lines I could have done no better

CURRENT PROJECT - FIGHT OF THE CENTURY VIST
http://www.freewebz.com/supermonkeysmansion
PiratSS
21
Years of Service
User Offline
Joined: 18th Oct 2002
Location:
Posted: 13th Apr 2003 23:07
I am thinking of improving it with 25 commands now
That would be cool.

Cheers.

There are two types of people in the world: The ones who summon and the ones that create. There is a big difference...

Login to post a reply

Server time is: 2024-04-27 03:12:38
Your offset time is: 2024-04-27 03:12:38