|
|||
|
Full Contact - A Connect Four Robot |
||
|
|
||
|
About the Robot |
|
|
|
This is a robot that was designed and built to play Connect-Four in a contest against other robots, which it was lucky enough to win. During the event, it didn't lose any games (once I remembered to plug the AC into the RCXs) The name comes from the method it uses for checking the board. Six axles are pushed into the six vertical holes, contacting any chips which are in the board. This process is repeated seven times (once for each column).
|
|
|
|
This is one of my favorite robots, because it's very easy to explain what the robot does. Many of my robots are designed for a specific challenge, which really don't make sense to most people. However Full Contact is easy to explain, easy to understand, but hard to beat. |
|
|
|
I believe Connect-Four is about the most difficult game a LEGO robot (using no other processing power) could play, and reliabily win against a human.
|
|
|
|
|
||
|
Win Record |
|
|
|
I've set-up Full Contact on several occasions, and let people play it. During most days, where it will play for up to eight hours at a time (close to 100 games), I can usually count the number of times it lost on one hand. |
|
|
|
Full Contact doesn't take very long to make moves. Its average move time is around 10 seconds, and there is no visible time spent calculating its next move. |
|
|
|
|
||
|
Pictures |
|
|
|
My pictures from the event Derek clearly had the next bestrobot at the Connect Four event. I never saw it make a mistake, but it did take quite a while to make some of it's moves. (up to 2.5 minutes) Check out Derek's event Pictures. and some pictures of his robot Singer |
|
|
|
Indylug posting about a display where I set it up and let people play it. And some movie clips: |
|
|
|
|
||
|
I like this picture, because
it shows how Full Contact usually wins by having more than one possible
play. In this case the opponent (black) has just gone, and gotten three
in a row, but the robot will win before the opponent has another turn. |
|
|
|
|
||
|
Hardware: |
|
|
|
2 RCXs v1.0, with AC adaptor |
|
|
|
4 motors |
|
|
|
2 rotation sensors |
|
|
|
5 Mindstorms touch sensors |
|
|
|
5 Cybermaster touch sensors (from a set sold in England in 1999) |
|
|
|
1 light |
|
|
|
5 Minifigs |
|
|
|
1 US flag |
|
|
|
Many other parts |
|
|
|
|
||
|
How it works: |
|
|
|
Sensor Array |
|
|
|
This is really the key to Full Contact. Six touch sensors are connect in series. Five are Cybermaster sensors and one is a normal Mindstorms sensor. The Cybermaster sensors are the same as Mindstorms sensors, except they have a resistor across the connections, so when the switch is OPEN, there is still a reading. There are three different sensors (different colors) which each have a different resistance, allowing them to be connected together, so you can distinguish which sensors are pressed at any time. However, for this application, I didn't need to know WHICH sensors are pressed, only how many. (I know it starts at the bottom). That allowed me to connect all six touch sensors in series, to a single input. The sensors were Normally Closed (pressed, when the array is not in contact with the board), and the sensors are Opened when it comes in contact with the board. This causes the resistance (reading on the RCX) to rise with the number of sensors pressed. When the top sensor (the Mindstorms sensor) is Open-ed the resistance goes to it's upper limit, and the robot knows the column is full. |
|
|
|
|
|
|
|
Main Control |
|
|
|
The robot is controlled by two RCXs. The first RCX controls all the logic, chip detection, chip dropping, opponent messages and sending messages for robot navigation. One motor controls the chip-dropper, and a light is connected to indicate when the robot is waiting for its opponent to move.
|
|
|
|
The sensor array is connected to the main RCX, along with the signal line from the opponent for signaling when they have completed their move. |
|
|
|
The second RCX controls major movement of the robot forward/backward and left/right. Each axis is controlled by one motor and one rotation sensor. The Forward/Backward axis also has an End-Of-Travel touch sensor, so the robot can home itself. |
|
|
|
|
|
|
|
|
|
|
|
|
||
|
Other Features |
|
|
|
Look-ahead of 4 moves |
|
|
|
Opening book with 384 moves |
|
|
|
Fast-Guess - If opponent has only one move to prevent win, check there first. If opponent played there, continue as normal, otherwise, play in that column (and win) |
|
|
|
Do not check columns known to be full. |
|
|
|
If opponent plays more than one chip, or removes a chip, declare victory. (no cheating) |
|
|
|
Disabled - Calculate future moves while waiting on opponent |
|
|
|
Runs on 16 mhz processor with 32k RAM |
|
|
|
|
|
|
|
|
||
|
Common Questions |
|
|
|
Q: "How does it know what color the chips
are?"
|
|
|
|
Q: "Why does it keep going in the middle?"
|
|
|
|
Q: "Can anyone beat it?"
|
|
|
|
Q: "What if I put in two chips (or take a
chip out)?"
|
|
|
|
Q: "Can the robot go first?"
|
|
|
|
Q: "How long did it take to build?"
|
|
|
|
|
||
|
These are some of my random notes from when I was designing it. |
|
|
|
|
|
|
|
|
|
|
|
1) right/left (RCX1) 2) forward/back (RCX1) 3) drop chip (RCX2) 4) Signal Opponent [EOT] (RCX1)? 5) Waiting for Opponent, light 1) Rotation1: Right/Left (RCX1) 2) Rotation2: Forward/back
(RCX1) + Touch for Home 3) Local EOT check 4) Touch: Detect Chip (chip
array x6) (RCX2) 5) EOT from opponent (RCX2)
|
|
|
|
There are several programs required: Master Controller: 1)
ELC-MasterWL.lx
– Master Control Software 2)
FullContactMasterMovementTest.lx
– Location Test 1)
FullContactSpeedControl.lx
– Position Software 2)
Backup
Positions? (second program) 3)
SensorTestCode.lx
– Display Rotation Positions |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
||
|
|
This page is not associated with The LEGO Group in any way. |
|