Advanced Search

Browse by Discipline

Scientific Societies

E-print Alerts

Add E-prints

E-print Network

  Advanced Search  

CS680: TicTacToe Assignment Due Jan. 29th (SURGE Feb. 12)

Summary: CS680: Tic­Tac­Toe Assignment
Due Jan. 29th (SURGE Feb. 12)
This assignment will give you practice with the simple reinforcement learning algorithm discussed in
Chapter 1 in the context of learning to play Tic­Tac­Toe. The algorithm and game have already been
implemented in Common Lisp in the file ~cs680/Handouts/ttt.lisp. You may use this code directly,
or re­implement it using a language of your choice. To run, copy this file to your own directory and load
it into Allegro Common Lisp.
Here is a little help getting started with Allegro Common Lisp. First, be sure your .cshrc file
contains this line, after your path has been set:
# Add pathway to Allegro Common Lisp
set path = ( $path /usr/local/allegro4.2/bin )
After you source your .cshrc file, you can run Allegro Common Lisp with the command clim2xm.
To run from within emacs, include in your .emacs file in your top directory the lines contained in
~cs680/Handouts/dot­emacs­acl. Now, log into one of our Solaris machines, such as mahler. Start
emacs, then do M­x load­acl. Then edit (with “x­“f) your TTT.lisp file and type “c­“b to compile
and load the entire buffer. Now, if you visit the *common­lisp* buffer, you can run the compiled code.
First try running one game, by running (init), then (game). Notice that the values for each state
are 0.5, their initial values. Now train your TTT player by runing a bunch of games and printing the
value of the final state reached in each game. The function (run) will do this; it plays 100 games,
prints the average value of the final state over these games, then repeats this 40 times. Finally, try


Source: Anderson, Charles W. - Department of Computer Science, Colorado State University


Collections: Computer Technologies and Information Sciences