TicTacToe GPT Finetuning
Simple python implementation of Tic Tac Toe.
Designed to make GPT able to recognize valid moves in Tic Tac Toe
$ pip install tictactoe-gpt-finetuning
Examples
Generate a game:
from tictactoe_gpt_finetuning import tictactoe
print( tictactoe.generate_random_game() )
Generate many games:
from tictactoe_gpt_finetuning import tictactoe
print( tictactoe.generate_n_games() )
Initialize and use the game board to place in top left:
from tictactoe_gpt_finetuning import tictactoe
b = tictactoe.BoardState()
b.make_move( 0, 0, 'x' )
print( b )
# output:
# x - -
# - - -
# - - -
Train a Model
We can compare inputs to outputs of the model, and compare predictions of the model before and after finetuning.
from tictactoe import Model, finetune, compare_tictactoe_predictions
gpt = Model()
# See what predictions look like before finetuning
compare_tictactoe_predictions( gpt )
# Fine-tune the model
finetune( gpt, n_epochs=10 )
# See what new predictions look like after finetuning
compare_tictactoe_predictions
Metadata
Release files for tictactoe-gpt-finetuning 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| tictactoe-gpt-finetuning-0.1.3.tar.gz | 5.2 kB | Without provenance | Details for tictactoe-gpt-finetuning-0.1.3.tar.gz |
Release files / tictactoe-gpt-finetuning-0.1.3.tar.gz
| Download URL | tictactoe-gpt-finetuning-0.1.3.tar.gz |
|---|---|
| Size | 5.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f376d792a80aa0e322fbc2d9e08c7ebda83e87c29d6f3d30d63aef5dcccbca5d
|
|
BLAKE2b-256 checksum How to use checksums |
f68f1e64cdedf60ffef82158c690e1725b2f43746d6d305f398aca7309e07a2e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.9
|
Security for tictactoe-gpt-finetuning 0.1.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.