Skip to content

gnshb/hangman

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hangman Challenge

This is my attempt at Trexquant 25 Hangman challenge. Trexquant reserves all rights to the question and related code. The rest is distributed freely under GPLv3. Any suggestions or improvements are welcome!

Navigating the Repository

  • gymnasium_env: Custom HangmanEnv implementation of OpenAI's gymnasium env
  • bible.py: Interface for reading the dataset
  • test_agent_accuracy.py: Tests the agent's accuracy on randomly sampled training data plus new words
  • recurrent_maskable: Custom combined stablebaselines3 implementation of Recurrent and Maskable PPO by wdlctc
  • text_files/: Custom training datasets
  • config.yaml: Main config file to perform simulations
  • colab_script.sh: bash script to automate colab run
  • local_run.sh: Sample the word list to test the agent on different word lengths
  • *.py: Different agent instances

Running and Reproducing results

  • Clone the repository
  • pip install -r requirements.txt
  • pip install -e ./
  • pip install -e recurrent_maskable/
  • Configure config.yaml with appropriate parameters
  • Choose your favourite agent and run python agent.py. For example, to run RecurrentMaskablePPO, execute python combined_ppo.py
  • Run python test_agent_accuracy.py to locally check the accuracy of the agent after training

About

Solving Hangman using Recurrent-Maskable PPO

Resources

Stars

Watchers

Forks

Contributors