pravj / semantris-solver

Automated solver for Semantris using OpenCV and Word Embeddings

Home Page:https://hackpravj.com/blog/solving-semantris-opencv-word2vec/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

semantris-solver

Automated solver for Semantris using OpenCV and Word Embeddings


Setup

Clone the repository
git clone git@github.com:pravj/semantris-solver.git
Setup Python environment with the required packages
pip install -r requirements.txt
Setup OpenCV and Tesseract
  • Install OpenCV and Tesseract for your OS
Setup word embeddings
  • Download pre-trained word2vec from Google News corpus
  • Set the model path as an environment variable SEMANTRIS_SOLVER_WORD2VEC_PATH
export SEMANTRIS_SOLVER_WORD2VEC_PATH=/path/to/GoogleNews-vectors-negative300.bin

Usage

Semantris Solver

Usage:
  main.py play [--mode=<mode>] [--verbose]
  main.py (-h | --help)
  main.py --version

Options:
  -h --help      Show this screen
  --version      Show version
  --verbose      Print game activity logs
  --mode=<mode>  Semantris game mode [default: arcade]
  • For now it only supports the arcade mode of the game.
  • Using the --verbose flag will enable the verbose logging configuration.
python main.py play --mode=arcade --verbose
  • It will take 5-10 minutes to load the word embedding model
  • Start the arcade version (in blue color theme) of the game in a full screen mode
  • Put the cursor in the game input field for the system to enter the suggestions
  • Wait for the magic model to load 🎉

Arcade mode

Alt text


Pravendra Singh

About

Automated solver for Semantris using OpenCV and Word Embeddings

https://hackpravj.com/blog/solving-semantris-opencv-word2vec/


Languages

Language:Jupyter Notebook 91.7%Language:Python 8.3%