Minimax Demonstrated Using Tic-Tac-Toe in Ruby, Lisp and Haskell
To run the ruby version, make sure tictactoe.rb has execute privileges and run
For the lisp version, you need install a Lisp implementation. I use clisp. On a mac, you can install that with “brew install clisp”.
cd to the “phase1” directory and run
clisp in your shell. When clisp loads, run
(exit) to end the session.
Enter the fms.tictactoe namespace and run
ghc —-make tictactoe.hs and run
./tictactoe or load it into ghci with
:l tictactoe.hs and run
Instructions for installing the Glasgow Haskell Compiler (GHC) can be found here: http://www.haskell.org/platform/