Playground for AI algorithms in diferent games. This algorithms are implemented in javascript in the Node.js enviroment.
Basic MinMax algorithm with Alpha Beta optimization in alphabeta.js.
function chooseBest(node, depth, functions)
Returns the node with the best move available
- node: initial node to expand
- depth: number of levels to expand, <=0 means infinite
- functions: object with the required functions:
- getChildren(node): returns the children nodes from a node
- terminal(node): returns true if the node is terminal
- utility(node): return the heuristic utility of the node in its current state
Chess implementation in main.js, makes usage of chess.js by jhlywa for the chess logic, and chessboardjs by oakmac for the graphic representation of the game in the client side. Uses express in the server side.
TicTacToe implementation in tictactoe.js. Makes usage of TicTacToeJS by ryanhs, modified in games/TicTacToe.js.
- More AI Algorithms
- More Games
MIT
Free Software, Hell Yeah!