Table of Contents
This project is a Reinforcement Learning (RL) environment designed to train and evaluate agents playing the classic Portuguese card game Sueca. The implementation includes a game engine, multiple agent types (random, heuristic, and DQN-based), and tools for training and visualizing agent performance. The goal is to create intelligent agents that can learn optimal strategies for playing Sueca through reinforcement learning.
Allegedly you can run this project anywhere, given your machine can handle the computation required. As for python dependencies, after you clone the repository you need the following:
pip install -r requirements.txtpython learn.py learn.py [-h] [-s SAVE] [-n N] [-l [LOAD ...]] [-q] [-t TEAMS]| Option | Description |
|---|---|
-h, --help |
Show this very same help message |
-s SAVE, --save SAVE |
Save the current model into a file after training, for later loading |
-n N |
Number of episodes (NOTE: only changes if you are using your GPU) |
-l [LOAD ...], --load [LOAD ...] |
Load a previously trained model to have it play as well (supports multiple files/agents) |
-q, --test |
Won't train any new agent: Use to test with whatever agents you load (or not) |
-t TEAMS, --teams TEAMS |
Define the teams. Example: "r,t0,t1,n" with (r)andom, (t)rained+index, (h)heuristic and (n)ew. Index is used if there is more than one trained agent loaded (otherwise use just 't') |
python learn.py -t n,h,t,h -s trained_agent_name -l another_trained_agent_name -n 5000The next step I'm currently on is creating a very simple interface to actually watch games rather than relying into the logs and staring at ugly ratio graphs.
