Andy's LEGO® Mindstorms® Page
About this site
  
What's New?
  
Standard Disclaimer
Quite C
  
Francesco Ferrara
  
Getting Started
  
Installing Quite C
  
Compiling a project
  
Sample Code
Chess
  
The Robot Chess Project
  
Programming Chess
  
First Attempt
  
Version 0
  
Version 1
  
The Program
  
The State of Play
  
The User Interface
  
The Move Generator
  
The Move Applier
  
The Rating Algorithm
  
The Search Algorithm
  
Putting it all together
  
The Robot
  
The Head
  
Moving the head
  
Movies
  
Downloads: Source Executables, MLCad Models
4-in-a-Robot
  
4-in-a-Robot - the Robot
  
The 4-in-a-Robot Base
  
The 4-in-a-Robot Delivery Mechanism
  
The 4-in-a-Robot Controller
  
4-in-a-Robot - the Code
  
The 4-in-a-Robot Algorithm
  
The 4-in-a-Robot Control Programming
  
The 4-in-a-Robot Robot-less version
  
Installing 4-in-a-robot
  
Playing the robotless 4-in-a-robot
  
View the source code
Speech
  
The problems with speech
  
Sounds familiar
  
H8 Timers Background
  
Trial and Error
  
Volume Zapper
  
Actually Speaking
  
Speak.c - the code
  
The VB code generator
Some ideas for the future
  
Room positioning robot
  
Neural Net Bot
  
Pianola
  
Text to speech
LEGO® Mindstorms® Links

[268745]

Playing the robotless 4-in-a-robot


 

Playing the robotless version:


Make a board:

You can use a connect-four set, or you can draw a grid on a peice of
paper.
The grid should have seven columns, and six rows.
Number the columns 0 to
6 (computers usually start counting at 0) so that you can easily see where the
computer wants to play.
I won't go into the rules of connect four here, but
breifly the idea is to get four in a row by playing counters in columns.
Counters build up from the bottom of each column.
Simple to learn, a lifetime to
master - hey that gives me an idea for my next project!
Level
Selection:
When it starts up a new game, we need to select what level we want
to play at. The display will read "LEVEL"
Press the VIEW button to cycle
through the levels, these are:
EASY - one level of lookahead (instant
response)
OK - two levels of lookahead (almost instant response)
HARD -
three levels of lookahead (10 seconds per move)
SUPER - four levels of
lookahead (about a minute per move)
then press the RUN button when you have
selected the level you want to play at

Who goes first:

The next step
is to decide if you want to go first
The display will read "FIRST"
press
the VIEW button to say if you want to go first, each time you press it, it will
change the display from "YES" to "NO" and vice-versa. When you've made up your
mind, press the RUN button.

Now the game begings...

When it's your
go:

The display will read "YOU 0" - this means it's your go, and you're
currently about to play into column 0 (columns are numbered 0 to 6)
As per
usual, press VIEW to change the column you want to play in, then press RUN when
you are happy. If there is no more room in the column, the display won't change,
so you'll need to select another column.

When it's the computer's go:

The display will read "MY GO" (although it looks a bit like ny go!) while
the computer thinks. On the easier levels, you probably won't even see this
message, on the SUPER level, be patient - it will make up its mind
eventually.
The display will now show "CPU n" where n is a number 0 to 6.
This is the column the computer plays.

When it's game over:
If someone
wins, the display will read "I WIN" or "U WON" (although the "W"s look like "U"s
- you'll need a little bit of imagination here!). If it's a draw, you will see
"DRAW"

Playing again:
The display will read "AGAIN"
Press VIEW to
select "YES" or "NO", then press RUN.
If you select "NO", the RCX will reset
itself to it's default firmware, if you select "YES", you go back to the level
selection stage, ready for a new game.

Stopping
Playing:

Unfortunately, I haven't coded in a 'Quit' function, so to stop
playing halfway through, you'll need to remove the batteries of the RCX to do a
reset. Sorry, I'll look into including this in the next version.

So there
you have it. 4-in-a-robot, I hope you enjoy playing!


Back to: Installing 4-in-a-robot

Show Topic: The 4-in-a-Robot Robot-less version

Next Page: View the source code