This is an AI minitchess agent built originally as a course project for CS542 (Advanced AI: Combinator Games) taught by Dr. Bart Massey at Portland State University in Spring 2017; it does alpha-beta pruned negamax search with time-limited iterative deepening and transposition tables keyed on Zobrist hashes. Computational effects are handled with an extensible effects framework provided by the freer-effects library.
The main function runs a local console game against the agent, limited to 40 turns per player, with the agent aiming to take about 7.5 seconds per turn. There's also code in here for connecting to PSU's Internet MiniChess Server and playing games over the network.
Chess.hs contains definitions for the rules of chess, the definition of the Agent type, and the playGame function, which runs a game between two agents to completion. Agent/Console.hs has comments that explain the pattern I'm using for constructing agents, and the other agents are commented where they make interesting changes on that formula. Control/Monad/Freer contains some effects that the agents depend on in addition to the ones included in the freer-effects library, and some commands for setting up IMCS games are defined in IMCS.hs. The Scripts directory has functions that set up and execute games between particular agents. Grid.hs defines a general interface for 2D grids, which is meant to support experimentation with different board representations, but right now Grid/Array.hs is the only reasonable one.