Need help with Chomp (a game for scheme)--Using Dr. Scheme to Program 
Author Message
 Need help with Chomp (a game for scheme)--Using Dr. Scheme to Program

I was just wondering if anyone could help me with this program I have to write.
 It should be pretty simple if you are good in scheme which I am not, but I
would really appreciate any help that anyone gives.

Please e-mail me if you can help.  Thanks

Game instructions
Chomp is played on a rectangular, row X column, board (where row and column are
positive integers). The lower left-hand corner of the
board contains a "poison" counter and the purpose of the game is force your
opponent to "eat" it. Players take turns removing ("eating") counters by
specifying a square of the board and removing it and all counters above it
and/or to its right. Thus if the 6x4 board looks like this:
O O O O O O
O O O O O O
O O O O O O
X O O O O O
and a player picks 4,2 the board looks like this after that player's
move:
O O O
O O O
O O O
X O O O O O
The X square is, of course, the "poison" square. It is "as thought
the field were a cracker and a right-angled bite were taken from it by jaws
approaching the cracker from the northeast."
Basically, there are three representations of the board that you can
choose from to represent the board
(1) a two dimensional vector
(2) a list of lists (with each inner list representing a column or a
row)
(3) a list of numbers (with each number representing the number of O's in a row
or a column). Example: 4x3 = (4 4 4)
The program must also implement a strategy. Here are some thoguhts
about the stratefy:
(1) the first player has a winning strategy but nobody knows what it
is
(2) the game for a square board is easy for the first player
(3) so is the game for a 2-wide or 2-tall board

This suggests some things:
(1) Avoid chomping to form either a square or a 2-wide or 2-tall board
(2) if oyu opponent gives you such a board to work with, be prepared
to go for the jugular.

One final note, the size of the board can change meaning that you can
have board sizes like 6x8, 5x9, and 7x8.



Sun, 28 Apr 2002 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Newbie to Dr Scheme programming question

2. Scheme in Dr. Dobb's

3. (Q) Dr. Scheme Editor

4. Debugger for current version of Dr. Scheme?

5. PLY Dr. Scheme

6. Chez to Dr. Scheme

7. Don't Understand this Dr. Scheme Answer

8. Scheme in Dr. Dobb's

9. Dr. Scheme "local"?

10. scheme-features: a Scheme evaluation program

11. Need comparison between Bigloo scheme, MIT-sheme,PLT-scheme

12. Need comparison between Bigloo scheme, MIT-sheme,PLT-scheme

 

 
Powered by phpBB® Forum Software