programdemos/tttml-train.xtl

TTTML, part 1: learn tic-tac-toe by playing itself, then save what it learned to work/tttml.model, a text file of numbers (the codes of the positions it met, then their values). Run it with "xetal run demos/tttml-train.xtl"; part 2, demos/tttml-play.xtl, loads the model and plays you. Uses the TTTML library (lib/TTTML.xtl).

source · imports t: lib/TTTML.xtl

m : Float

value · line 11

The model learned from 2000 games against itself.

m ← 2000 ᵗt̲rain! ᵗempty