Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
negamax_simple_example.cc File Reference

Minimal Negamax example: solve Tic-Tac-Toe from the empty board. More...

#include <iostream>
#include <State_Search.H>
#include <tpl_array.H>
Include dependency graph for negamax_simple_example.cc:

Go to the source code of this file.

Functions

int main ()
 

Detailed Description

Minimal Negamax example: solve Tic-Tac-Toe from the empty board.

This is the simplest possible adversarial-search example. It defines a Tic-Tac-Toe domain, runs plain Negamax without transposition tables, iterative deepening or move ordering, and prints the game-theoretic value and the principal variation.

For advanced features (TT, iterative deepening, aspiration windows, move ordering, tracing) see negamax_tictactoe_example.cc.

Build and run:

  • cmake --build build --target negamax_simple_example
  • ./build/Examples/negamax_simple_example

Definition in file negamax_simple_example.cc.

Function Documentation

◆ main()

int main ( )

Definition at line 157 of file negamax_simple_example.cc.

References Aleph::divide_and_conquer_partition_dp(), and root().