This project allows users to use image-state in a specific game: Ice Hockey (Atari).
This project also combined the YOLO to extract the location as the state in a specific game: Ice Hockey (Atari).
Algorithms: GAIL, off-policy PPO
Youtube:https://www.youtube.com/watch?v=rgYOhhg0DUk
- This project only supports Mac user and Linux user
- This project uses Python3
Website (Follow the instruction from this link)
Please ensure you have installed the anaconda environment.
Website (Follow the instruction from this link) Please ensure you have installed the Pycharm environment
Open our code with Pycharm
- Click "Pycharm" (Top menu)
- Click "Preference"
- Find "Project Interpreter" under your project
- Add "Conda Envionment" one by choosig the "Existing environment"
- Add address like "/User/USERNAME/anaconda3/bin/python"
- Finally click "Apply"
-
Find file and open the file "DropTheGame/Demo/StateClassifier/darknet.py"
-
Go to line 48.
-
If you are using Linux:
lib = CDLL("StateClassifier/libdarknet_linux.so",RTLD_GLOBAL)
If you are using Mac:
lib = CDLL("StateClassifier/libdarknet_mac.so",RTLD_GLOBAL)
pip install -r /DropTheGame/Demo/requirement.txt
You can run "Start.py" directly. We have added some example codes under the main function. Uncomments any of them to try.
Firstly, you have to make sure you are inside "DropTheGame/Demo"
python Start
The functions listed in Start.py can be called as following
from Start import IceHockey
IH = IceHockey()
IH.AIplay(True,"loc")
conda install -c akode gym
conda install -c conda-forge opencv
brew install swig
from gym import envs
gym.envs.registry
Restar Spyder every time once a new tool is installed by “pip install”
print(deEnv.unwrapped.actions_space) #useless
Method 2:install via homebrew https://www.pyimagesearch.com/2016/12/19/install-opencv-3-on-macos-with-homebrew-the-easy-way/
The GAIL and PPO codes are modified based on part of OpenAI Baseline