Skip to content

oeick/tictactoe

Folders and files

NameName
Last commit message
Last commit date
Jul 26, 2021
Jul 27, 2021
Jul 25, 2021
Jul 27, 2021
Jul 27, 2021
Jul 27, 2021
Jul 27, 2021
Jul 26, 2021
Jul 27, 2021
Jul 27, 2021

Repository files navigation

tictactoe

Experimenting with the MENACE algorithm.

Install

python -m pip install .

Start

Human vs AutoPlayer:

python cli.py

AutoPlayer vs itself:

python auto.py <number_of_rounds_to_play>

Key map for human player:

 q | w | e
---+---+---
 a | s | d
---+---+---
 z | x | c

Quit playing without saving:

ctrl-c

Quit playing with saving:

!

Tests

python -m unittest discover -s tests

representative field

A field is stored as a nine characters string.

A given field is translated to its representative field by finding all equivalent fields through rotating and flipping. Those eight equivalents are then sorted, and the first one is used as the representative field.

Rotating and flipping operations are coded in tools.OPERATIONS.

Decision model

See values of decision model ("beads" and "boxes") in decision_model.yaml. Values are stored between games.

About

Experimenting with MENACE

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages