README for Bill's Mancala

   OK, I saw Scott Sauyet's post in rec.games.abstract about Mancala and
decided to write a computer program to play against to get a feel for the
game.  I know it sucks, but I played it a few times and it beats me when it
looks ahead two moves so I don't care.
   To compile:
gcc -O2 mancala.c ab.c rnd.c -o mancala

   To run:
mancala <player 1 lookahead> <player 2 lookahead>

   where lookahead of 0 means a human plays.  Player 1 is the top row,
player 2 is the bottom.  For example.

mancala 0 2	means you go first, and the computer looks ahead 2 moves.
mancala 4 0	means you go second, and the computer looks ahead 4 moves.
mancala 3 3	Watch the computer play itself!
mancala 7 1	Watch how badly a smart computer beats a dumb one!

ABOUT THE PROGRAM
   ab.c is the alpha-beta search engine.  It doesn't prune or extend the
searches of interesting paths.
   mancala.c is the "hooks" for the search engine and the user interface
(if you can call it that).  To evaluate the worth of a move it just returns
the number of stones you got to put in your scoring pit (you can tell I
didn't try real hard to be clever here).
   rnd.c is a random number generator I had lying around.  I used it to
keep the computer from playing _exactly_ the same moves every game.

   Let me know what you think!  But be nice...remember, I only spent an hour
on this.  If I spent two hours it'd be _way_ more impressive.

   				-Bill (wms@ssd.intel.com)
PS - It plays the rules as Scott posted them.  They were kind of vague;
     for example, what happens when you have no legal move?  The program
     then forces you to pass.  If you don't like this feel free to change it.
