tictactoe-gpt-finetuning

Python tic tac toe state generator and GPT fine tuning


Keywords
tictactoe, llm, language-models
License
MIT
Install
pip install tictactoe-gpt-finetuning==0.1.3

Documentation

TicTacToe GPT Finetuning

Simple python implementation of Tic Tac Toe.

Designed to make GPT able to recognize valid moves in Tic Tac Toe

{language=python}

$ pip install tictactoe-gpt-finetuning

Examples

Generate a game:

{language=python}

import tictactoe_gpt_finetuning as tictactoe
print( tictactoe.generate_random_game() )

Generate many games:

{language=python}

import tictactoe_gpt_finetuning as tictactoe
print( tictactoe.generate_n_games() )

Initialize and use the game board to place in top left:

{language=python}

import tictactoe_gpt_finetuning as tictactoe
b = tictactoe.BoardState()
b.make_move( 0, 0, 'x' )
print( b )
# output:
# x - -
# - - -
# - - -