Examples of Tic-Tac-Toe utilizing minimax in a variety of languages
Common Lisp Clojure Ruby Haskell
Latest commit 1580dd1 May 6, 2014 @flyingmachine Merge pull request #1 from luisgerhorst/master
Haskell version
Failed to load latest commit information.
phase1 Haskell version May 2, 2014
phase2 yogthos's suggestions Oct 25, 2012
.gitignore ignore emacs files Feb 27, 2012
README.textile Haskell version May 2, 2014


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 ./tictactoe.rb.

Common Lisp

For the lisp version, you need install a Lisp implementation. I use clisp. On a mac, you can install that with “brew install clisp”.

After that, cd to the “phase1” directory and run clisp in your shell. When clisp loads, run (load 'tictactoe)

Enter (exit) to end the session.


Enter the fms.tictactoe namespace and run (start)


Compile with ghc —-make tictactoe.hs and run ./tictactoe or load it into ghci with :l tictactoe.hs and run main.

Instructions for installing the Glasgow Haskell Compiler (GHC) can be found here: http://www.haskell.org/platform/