The ultimate goal of this project is to implement atari game player by reinforcement learning algorithm DQN.
- OS : Window 11
- Python : 3.6
- Use Anaconda3
- Use Pytorch
- Use gym(Open AI)
- You should install Anaconda3 -> Anaconda download link
- Create Anaconda virtual env and turn on the env
# create env
conda create -n atari_openai python=3.6
# activate env
conda activate atari_test
- Install required pakages by conda
# pytorch(cpu or gpu)
conda install pytorch torchvision torchaudio cpuonly -c pytorch # if your pc use only cpu
conda install pytorch torchvision torchaudio cudatoolkit=11.1 -c pytorch -c conda-forge # gpu
# opencv
conda install -c conda-forge opencv
# gym
conda install -c conda-forge gym
# atari_py
conda install -c conda-forge atari_py
- Install Roms(Roms download Link) and unzip a file
- Enter the following command.
python -m atari_py.import_roms <path> # path ex) ~\Roms\ROMS
*I referred to the paper(Playing Atari with Deep Reinforcement Learning - DeepMind).
Raw Atari frame ,which are 210 X 160 pixel images with a 128 color palette, is computationally demanding. So we should apply preprocessing for reducing the input dimensionality. The raw frames are preprocessed by converting RGB to gray-scale and resizing it to a 84 x 84 pixel image using opencv library.
It is implemented in utils.py as make_env function.
It is implemented in utils.py as experience function.
It is implemented in network.py.