Important alert: (current site time 7/16/2013 3:41:51 AM EDT)
 

winzip icon

AI Checkers

Email
Submitted on: 5/24/2000 3:42:49 PM
By: Viper 
Level: Intermediate
User Rating: By 12 Users
Compatibility: VB 4.0 (32-bit), VB 5.0, VB 6.0
Views: 34112
(About the author)
 
     This code is an artificial intelligence checkers program and is virtually impossible to beat (Runs at depth of 5 or 6 on a P2 266). This code has won 2 code of the month awards both on this website and A1VBCode.

 
winzip iconDownload code

Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. Afterdownloading it, you will need a program like Winzip to decompress it.Virus note:All files are scanned once-a-day by Planet Source Code for viruses, but new viruses come out every day, so no prevention program can catch 100% of them. For your own safety, please:
  1. Re-scan downloaded files using your personal virus checker before using it.
  2. NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.
  3. Scan the source code with Minnow's Project Scanner

If you don't have a virus scanner, you can get one at many places on the net including:McAfee.com

 
Terms of Agreement:   
By using this code, you agree to the following terms...   
  1. You may use this code in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.
  2. You MAY NOT redistribute this code (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.   
  3. You may link to this code from another website, but ONLY if it is not wrapped in a frame. 
  4. You will abide by any additional copyright restrictions which the author may have placed in the code or code's description.


Other 2 submission(s) by this author

 


Report Bad Submission
Use this form to tell us if this entry should be deleted (i.e contains no code, is a virus, etc.).
This submission should be removed because:

Your Vote

What do you think of this code (in the Intermediate category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor (See voting log ...)
 

Other User Comments

5/24/2000 10:38:37 PMCool33

What exactly (for those of us not yet involved with AI) is depth 5 or 6 at Pentium 2, 266 MHtz? Thanks
(If this comment was disrespectful, please report it.)

 
5/24/2000 10:49:46 PMJohn Pettit

Depth 5 and 6 when used correctly means that the computer's AI analyses serially all the moves that are possible by both players only for the next 5 or 6 moves. then it will select the best move...
i'm not sure whether viper means 5-6 computer moves or 5-6 moves including both players. (i haven't yet checked whether the program really does this :)

and...
I don't really want to say it, but I beat this AI quite easily. Probably not because it's not functioning well enough, but because it allows unpremoted checkers to take the other players checkers if they are behind it. I don't remeber all the rules of checkers but I'm pretty sure that's an illegal move. When you click to take a piece behind your unpremoted checker the computer's checker dissapears and my piece remains unmoved. Try it!

It's a great program. Keep up the good work!!!
(If this comment was disrespectful, please report it.)

 
5/27/2000 10:48:57 AMViper

A NEW version is now avaliable this all the bugs fixed (square are the right colour, you cannot take backwards, etc.) and a primative Alpha Beta Pruning routine has been implemented!
(If this comment was disrespectful, please report it.)

 
6/3/2000 11:23:09 AMDan

Great work though looking through i still don't understand how the A B pruning has been implement (is it depth first now?? or is it possible to use AB prun. with breadth first??)
(If this comment was disrespectful, please report it.)

 
6/3/2000 2:23:20 PMViper

Full international rules now employed
(but a bug somewhere please help find it)
(If this comment was disrespectful, please report it.)

 
6/3/2000 6:12:58 PMDan

You need to update the screenshot to reflect the changes. i am updating mine too now we actualy know the proper rules (lol!)
(If this comment was disrespectful, please report it.)

 
6/3/2000 6:54:17 PMDan

What does the bug do??
(If this comment was disrespectful, please report it.)

 
6/16/2000 12:38:07 AMSantaRulz

Beaten since 1st play ;) It does have a very nice AI, congrats!
(If this comment was disrespectful, please report it.)

 
6/16/2000 9:34:11 AMDave

Very nice! Although it seems you can take backwards on a double/triple jump, etc..
It's the best Checkers I've seen yet!
(If this comment was disrespectful, please report it.)

 
2/23/2003 6:33:19 PMYello

i kicked its a$$ .
(If this comment was disrespectful, please report it.)

 
3/31/2003 1:08:24 AMBram Pelgrom

"Impossible to beat" ... erm ... I, a 16 old, beaten it the first round.... hehe, nice AI though :P
(If this comment was disrespectful, please report it.)

 
6/3/2003 9:01:11 AMNico Bottema

at the end of the first round (only round) platying this this at least half of my pieces left, gotta work on the ai
(If this comment was disrespectful, please report it.)

 
1/14/2004 8:23:27 AM

Ok, if your going to make it so you can jump backwards, at least make it so you can move backwards as well.. and near the end the computer practically just gave up, it kept moving into my path when it didnt have to..
(If this comment was disrespectful, please report it.)

 
1/14/2004 10:58:26 PM

MOVE backwards?...what kind of checkers are you talking about? nice app!
(If this comment was disrespectful, please report it.)

 
1/15/2004 1:30:09 PM

Interesting. I, too, have beaten this A.I. (I use VB5, so I had to change the Round()s to CInt(), but aside from that, no changes) first-try (also, like Bram, I'm 16, but don't think it's necessary to advertise randomly; just making a useless inference). At first, I thought I was going to lose, but then I made some moves that forced the A.I. to where I wanted it to be. There were a few problems selecting pieces to move, but perhaps it's just from the logic of these "international rules" or something. The A.I.'s definitely got good logic, though, and checkers used to be one of my favorite games 'til I stopped playing for some reason or another.
(If this comment was disrespectful, please report it.)

 
1/15/2004 1:30:23 PM

You get a 5 from me for planning it out well, among other things. Good job. Glad to see ya used some APIs, as well. Seems most VB game designers just forget that API's there for them to take advantage of, so ya never see any. Also, it still seems that you can move backwards if an opposing piece is behind you. Not sure if this is a bug, but I've personally never played a game of checkers where you can move backwards at all without being promoted (not "premoted"). So, what's next; "How about a nice game of chess?" :-P -AOTChronoTrigger
(If this comment was disrespectful, please report it.)

 
8/17/2004 11:46:24 PMJonathan Naamad

You can still jump backwards on mine and the AI is par except for the end when it gives up.
(If this comment was disrespectful, please report it.)

 
10/30/2005 6:36:53 AMNat

idk wat u mean... i flogged it..
(If this comment was disrespectful, please report it.)

 
12/21/2006 6:18:03 AMDONAL GONCALVES

very good
(If this comment was disrespectful, please report it.)

 
12/1/2008 3:56:18 AMRipper

it crashes if it cant think.
(If this comment was disrespectful, please report it.)

 
11/10/2011 8:55:45 AMAyu

What algorithm is used in checkers project?
(If this comment was disrespectful, please report it.)

 

Add Your Feedback
Your feedback will be posted below and an email sent to the author. Please remember that the author was kind enough to share this with you, so any criticisms must be stated politely, or they will be deleted. (For feedback not related to this particular code, please click here instead.)
 

To post feedback, first please login.