Skip to content
This repository has been archived by the owner on Aug 8, 2022. It is now read-only.
/ gym-snape Public archive

Super Nifty Auto Pets Environment (SNAPE) for training RL agents to play Super Auto Pets.

License

Notifications You must be signed in to change notification settings

jasonjewik/gym-snape

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Super Nifty Auto Pets Environment (SNAPE)

EDIT (August 7, 2022): I decided to switch to implementing my own simple auto battler in C++ (which is not going to be a particularly faithful adaptation of Super Auto Pets), called A C++ Auto Battler (ACAB). When ACAB is in a playable state, I'll create another repo to wrap ACAB in an OpenAI Gym environment. That's the plan anyway.


I'm tired of losing consistently in Super Auto Pets, so I made this environment to train an RL agent to play for me.

This repository comes with a playable version of Super Auto Pets. See gym-snape/gym_snape/game/README.md for details.

Installation

$ conda env create -f environment.yml
$ conda activate snape
$ pip install -e gym-snape

Example

Pit two basic agents against each other.

>>> python example.py

Sample output:

This game has ended. No further actions can be taken.
This game has ended. No further actions can be taken.
PLAYER 1
+----------------------------------------------------------------+
| TURN: 82 | LIVES: 1  | TROPHIES: 10 | GOLD: 0  | ACTIONS: 3366 |
+----------------------------------------------------------------+
 ___         _
|   \ ___ __| |__
| |) / -_) _| / /
|___/\___\__|_\_\
4----------43----------32----------21----------10----------0
|HIPPO     ||          ||          ||          ||          |
|hp:  27   ||          ||          ||          ||          |
|atk: 23   ||          ||          ||          ||          |
|fct: ...  ||          ||          ||          ||          |
|exp: 0/2  ||          ||          ||          ||          |
|lvl: 1    ||          ||          ||          ||          |
4----------43----------32----------21----------10----------0
 ___ _
/ __| |_  ___ _ __
\__ \ ' \/ _ \ '_ \
|___/_||_\___/ .__/
             |_|
0----------01----------12----------23----------34----------45----------56----------6
|RHINO    *||COW       ||SCORPION  ||RHINO    *||TURKEY    ||PIZZA     ||MUSHROOM  |
|hp:  44   ||hp:  24   ||hp:  19   ||hp:  50   ||hp:  22   ||          ||          |
|atk: 41   ||atk: 22   ||atk: 19   ||atk: 50   ||atk: 21   ||          ||          |
|fct: ...  ||fct: ...  ||fct: Psn  ||fct: ...  ||fct: ...  ||          ||          |
|exp: 0/2  ||exp: 0/2  ||exp: 0/2  ||exp: 0/2  ||exp: 0/2  ||          ||          |
|lvl: 1    ||lvl: 1    ||lvl: 1    ||lvl: 1    ||lvl: 1    ||          ||          |
0----------01----------12----------23----------34----------45----------56----------6
You won!
PLAYER 2
+----------------------------------------------------------------+
| TURN: 82 | LIVES: 0  | TROPHIES: 9  | GOLD: 0  | ACTIONS: 3372 |
+----------------------------------------------------------------+
 ___         _
|   \ ___ __| |__
| |) / -_) _| / /
|___/\___\__|_\_\
4----------43----------32----------21----------10----------0
|          ||          ||          ||          ||          |
|          ||          ||          ||          ||          |
|          ||          ||          ||          ||          |
|          ||          ||          ||          ||          |
|          ||          ||          ||          ||          |
|          ||          ||          ||          ||          |
4----------43----------32----------21----------10----------0
 ___ _
/ __| |_  ___ _ __
\__ \ ' \/ _ \ '_ \
|___/_||_\___/ .__/
             |_|
0----------01----------12----------23----------34----------45----------56----------6
|CROCODILE*||SCORPION  ||ROOSTER  *||LEOPARD   ||TIGER    *||PEAR      ||MELON     |
|hp:  50   ||hp:  33   ||hp:  50   ||hp:  36   ||hp:  35   ||          ||          |
|atk: 50   ||atk: 33   ||atk: 50   ||atk: 42   ||atk: 36   ||          ||          |
|fct: ...  ||fct: Psn  ||fct: ...  ||fct: ...  ||fct: ...  ||          ||          |
|exp: 0/2  ||exp: 0/2  ||exp: 0/2  ||exp: 0/2  ||exp: 0/2  ||          ||          |
|lvl: 1    ||lvl: 1    ||lvl: 1    ||lvl: 1    ||lvl: 1    ||          ||          |
0----------01----------12----------23----------34----------45----------56----------6
You lost!

About

Super Nifty Auto Pets Environment (SNAPE) for training RL agents to play Super Auto Pets.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages