Change Log
Changelog
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
The the project’s CHANGELOG for more information.
[0.12.0] - 2025-10-31
Fixed
- Set default router address to 0.0.0.0
[0.12.0] - 2025-10-24
Added
- A link to the Alberta Plan on the Richard Sutton page.
Changed
- Tuned the
SimServerINFO log messages:- Print the epoch every 50 epochs.
- Print a new highscore when achieved.
- Tuned the
SimRouterINFO log messages:- Print the client and server counts when they change.
Fixed
- Fixed highscores plot.
-
Fixed
-vswitch so it doesn’t require an argument.
[0.11.3] - 2025-10-23
Fixed
- Git tag issue
[0.11.2] - 2025-10-22
Fixed
- PIP packages calls a synchronous main(). Add an main_async() method that main() calls.
[0.11.1] - 2025-10-22
Fixed
- Git tag issue
[0.11.0] - 2025-10-22
Added
- Complete redesign:
- Client/Server architecture to make the simulations fully deterministic. The Textual asyncio loop was polluting the simualtion, yielding different results with the same simulation starting parameters.
- Split the
AISimintoSimServerandSimClient. - Added
SimRouterand implemented ZeroMQ based messaging. - Supports running the multiple
SimClientsconnected to the sameSimServer. - Supports running the
SimClient,SimRouterandSimServeron different machines. - Added a new
DMQconstants file to support ZeroMQ messaging.
- Split the
- Took the SQLite (mostly) out of
ReplayMemoryand into a newDbMgrclass.- Added
highscore_events,games_scoreandavg_losstables.
- Added
- Updated website content:
- Added additional architecture and schema pages to the website.
- Added additional images to the architecture page.
- Updated the main page.
- Added additional architecture and schema pages to the website.
- Implemented targeted messaging:
- When a
SimClientconnects to a running simulation, it receives old highscore, game score and average loss data so the TUI plots are up to date.
- When a
- Command line switches:
- To increase verbosity of console output for the
SimServerandSimRouterand for theSimClient'slog file. - To specify the hostname of the
SimRouterif it’s not running locally.
- To increase verbosity of console output for the
- Added a logger based
LabLoggermodule for cleaner console and log file output.- Added a
DLabLoggerconstants file.
- Added a
- Implemented full throttle mode for the
SimServer.- Automatically enabled when there are no
SimClientsconnected to theSimRouter. - Automatically disabled when a
SimClientconnects. - Increases simulation speed by a factor of about three!!
- Automatically enabled when there are no
- Made the README a pointer to the project website.
- Client/Server architecture to make the simulations fully deterministic. The Textual asyncio loop was polluting the simualtion, yielding different results with the same simulation starting parameters.
Fixed
- All TUI elements are now properly updated from the running simulation
- Header on all project files.
- Added a line pointing at the project website: https://snakelab.osoyalce.com/
[0.10.1] - 2025-10-19
Fixed
- Updated
ReplayMemory:append()to not store games if the memory type is set to None. EpsilonAlgoto make it compatable withEpsilonAlgoN. This way the two algorithms can be changed without any effect onAiSim.- Fixed
played_game()to accept an unusedscoreparameter. - Fixed dummy
new_highcore()to accept ascoreparamenter. - Fixed
epsilon()to accept an unusedscoreparameter.
- Fixed
[0.10.0] - 2025-10-16
Added
- A page outlining the notation used in Sutton’s RL Book.
- Added an dynamic training feature, where the
AIAgent:train_long_memory()code is run an increasing number of times at the end of each epoch as the total number of epochs increases.- Modified the
train_long_memory()code. - Added a new
DAIAgentconstants file withMAX_DYNAMIC_TRAINING_LOOPS - Added a
Dynamic Trainingcheckbox to the TUI settings - Added
dynamic_training()andepoch()methods to theAIAgentclass. - Added a
loopsTUI element to show the current number of loops used during the long training phase. - Added a Dynamic Training section to the project’s website.
- Modified the
- Added a Epsilon N feature in a new
EpsilonAlgoNclass.- Added a drop-down menu in the TUI to let the user choose between Epsilon and Epsilon N.
- Added an Epsilon N section to the project’s website.
Changed
- The learning rate default value for the RNN.
- Changed the default minimum Epsilon from 0.0 to 0.1.
Fixed
- Passed the TUI minimum, initial and decay Epsilon values from the settings to the actual
EpsilonAlgoandEpsilonAlgoNclassesAISim:update_settings().
[0.9.0] - 2025-10-13
Changed
- Added formatting for large numbers to the stored games and highscores game number.
- Added a Tabbed Plots widget.
- Moved the Game Score plot widget into the new Tabbed Plots widget.
- Added a Highscores plot.
- Added a Loss plot.
- Based on the shiny new Loss plot, tuned the learning rate for the linear and RNN models.
- Added a Learning Rate input to the configuration settings.
- Wired the sane default learning rate values (based on the model selection) so that the correct one is loaded when the Defaults button is pressed.
- Modified the
AITrainerto capture the loss at the end of each train step and return an average of these values at the end of an epoch with a newget_epoch_loss()function.
- Added additional constants to the
DLabelsandDlayoutsfiles to support the new features.
Removed
- Removed the
LabPlotwidget. It has been replaced by the newTabbedPlotswidget.
[0.8.1] - 2025-10-13
Added
- Show the number of frames for the long training phase, when
mem_typeis random frames.
Fixed
- Increased width so Random Frames isn’t truncated.
- Fixed SQL bug in
ReplayMemory:get_random_frames().
Changed
- Changed the highscores layout so there’s a space between the scrollbar and the seconds.
- Set the stored games back to zero when the restart button is pressed
- Clear the data from the games and frames SQLite3 tables when the restart button is pressed.
- Format the number of stored games (add commas) when they are large.
[0.8.0] - 2025-10-13
Changed
- Linear Model,
ModelL, changes:- Formatting improvement of the highscores.
- Increased the linear model’s (
ModelL) learning rate. - Added an additional hidden layer to the linear model.
- Decreased the dropout value from 0.2 to 0.1.
[0.7.0] - 2025-10-13
Added
- Added a Time column to the Highscores
- A screenshot of the TUI to the website.
Changed
- Plotting Widget:
- Renamed the plotting widget from
Db4EPlottoLabPlot - Removed the code that averaged results since I’m using a sliding method instead.
- Renamed the plotting widget from
- Added a target model that keeps a frozen copy of the main network. This prevents chasing moving targets instability issues.
- Added a soft update (τ=0.01) to blend weights in slowly. This smooths the learning curve.
- Replaced MSE with Huber loss. It’s less sensitive to large TD errors (outliers).
- Added gradient clipping to prevents exploding gradients.
- Added an update frequency (target_update_freq=100) to sync target every ~100 frames
- Vectorize the data coming out of the ReplayMemory leading to a HUGE improvement in speed.
- Adjust gradients on the batch, not single frames for better learning and smoother gradients
- Return the loss for future plotting.
Fixed
- Cleared the Plot Widget when the Restart button is pressed
- Reset the neural network model’s learned weights when the Restart button is pressed.
[0.6.0] - 2025-10-12
Added
- Added a
DColorsconstants file. - Updated website content.
- Added Schema, Constants, Project Layout, Git Branching and Git Commit technical documents.
- Added a Richard Sutton page.
- ReplayMemory exposes the current training game ID:
- Modified the
ReplayMemoryto return the stored game and frame IDs. - Modified the
AIAgentto first load the training data, get the training game ID, then train. - Modified
AISimto get the training game ID from tehAIAgentand display it in the TUI.
- Modified the
Changed
- Set the learning rate in the
AITrainer, based on the selected model.
Refactor
- Made handling and definition of constants consistent.
- Renamed the
DDb4ePlotconstants file toDPlot
[0.5.0] - 2025-10-11
Added
- Added a highscores widget showing the game number and the high score.
- Reworked the state map in
GameBoard:get_state() - Moved the
ModelRNNmodel parameters into theDModelRNNconstants file. - Updated the SQLite schema used by the
ReplayMemoryclass.- See https://snakelab.osoyalce.com/db_schema.html
- Added drop down menu to select the
ReplayMemorytype i.e. Random Game, Random Frames or None.- Added a runtime widget to display the current memory type
- Added sections to the website / README file.
- Added a Richard Sutton page.
[0.4.8] - 2025-10-11
Fixed
- Fix path to
AISim.tcss.
[0.4.7] - 2025-10-11
Changed
- Use
tempfilemodule to get a temporary file location for SQLite3 database. - Use safer cleanup for SQLite3 database.
[0.4.6] - 2025-10-11
Fixed
- Fix path issue with
ReplayMemory’s use of SQLite.
[0.4.6] - 2025-10-11
Fixed
- Add main() function to
AISim.pyso the CLI entry pointai-snake-labworks after apip install ai-snake-lab.
[0.4.5] - 2025-10-11
Fixed
- Fix import statements in
ai/* andgame/* files.
[0.4.4] - 2025-10-11
Fixed
- Fix import statements in
Constantsfiles.
[0.4.3] - 2025-10-11
Added
- Initial PyPI release.