4 In A Row, Connect 4, 4 Gewinnt
This is the Lego NXT "4 In A Row" robot project.
This robot is able to play against you on itself.
He is independend of any computer, so the program - programmed with NXC - is running on the NXT brick.
The human player can choose the row while pushing the touch sensor as often as the row's number. The computer decides on its own, which row would be the best for it.
This KI is working mainly on the MINIMAX algorithm. However the computer is not as hard as i want him to be, because of the less NXT Brick speed.
the algorithm works like that: The computer simulates the next 3 possible steps and gives any game situation a specific number of points. The Row with the most points will be the next computers choice.
The robot uses three NXT motors:
- one is moving the gameboard
- the second fixes the stones
- the third opens the gate
--
cool
airbusx3 3 years ago
Very nice job. You could reduce it to two motors using a "payout" type mechanism for the stones where the motor pushes and pulls a slider under the bottom of the pile of stones to push the bottom one out. LEGO SLOT MACHINE built by LV0404 dispenses coins that way. Excellent building. Well done.
ronaldmcrae 3 years ago
Awesome!
Particularly shifting the whole board is a smart reversal. Wonderful mechanism for the 'coins' as well. Brilliant...
Now get just as well in playing it :)
NXTLiftBoy 3 years ago
fätt;)
JackToTheBone 3 years ago