| TAR - Tactical Robot. | |||||||||||||||||||
|
[ Quite C ] Introduction |
I have programmed a Robot (made with Lego(R) Mindstorms) to play a game that is similar to connect-4. If you want to see it in action: taranim.gif (284Kb) Do your move and press the run button, the robot move to scan the board, think to the best move and put a white men on the board without your help!!! My program play this game (connect-3) very well! After 5 days I collected
32 game lost and two victory!
Connect 3 is a two players game which takes place on a 6x5 rectangular board placed between you and the robot. One player has 15 white men and the other 15 black men. Each player can drop a man at the top of the board in one of the six columns; the man falls down and fills the lower unoccupied square. Of course a player cannot drop a man in a certain column if it's already full (i.e. it already contains six men). There's no rule about which color should play first, but you must play with black men (more contrast for it). The game ends when ALL 30 men (15+15) are placed. The object of the game is to connect 3 men vertically, horizontally
or diagonally in line. 578 Lines of pure C code compiled with Quite C 1.05, ~7.5Kb of srec code. The software use a complex minmax search with alpha-beta pruning with a tree 5 level depth. A very good position evaluation algorithm help him a lot! Look at the source code A Cartesian based robot with light feedback positioning and a dispenser for piece. The robot have a phase to setup the exact quantity of light to distinguish black, gray and white lines or men. The robot use the board (a simple gif printed on a white sheet) to understand the robot position. You must initially put the robot over a white sheet that you must put high respect the board (look this photo) when you download the program the robot move to collect some light value. If you want to build my robot look here...
2.0
1.0
[ QC | Introduction
| What's new | CONNECT-3 |
Software | Hardware |
Photo | Version history |
Files ] |