How corentineuvrard/tic-tac-toe works
Project type and purpose
• This is a small, self-contained OCaml application implementing Tic-tac-toe with an AI opponent using the minimax algorithm.
• It’s structured more like a classic CLI/game engine than a client-server or web app.
File structure
• Top-level files correspond almost one-to-one with logical modules:
• ai.ml → the AI engine (minimax implementation)
• drawings.ml → presentation layer (text or ASCII “view”)
• functions.ml → core game rules and utility functions (move generation, winner detection, board evaluation)
• variables.ml → game state representation (board data structures, players, constants)
• tic_tac_toe.ml → main controller and game loop orchestrator
• makefile → build and run scripts
README for additional insights
• Confirms the use of minimax, hints at possible alpha–beta pruning—i.e., a future optimization of the search algorithm layer (AI module).