chuyangliu / snake

Artificial intelligence for the Snake game.
Apache License 2.0
1.65k stars 481 forks source link

need more explanations for arguments #32

Closed zinwalin closed 4 years ago

zinwalin commented 4 years ago
usage: run.py [-h] [-s {greedy,hamilton,dqn}]
              [-m {normal,bcmk,train_dqn,train_dqn_gui}]

Run snake game agent.

optional arguments:
  -h, --help            show this help message and exit
  -s {greedy,hamilton,dqn}
                        name of the solver to direct the snake (default:
                        hamilton)
  -m {normal,bcmk,train_dqn,train_dqn_gui}
                        game mode (default: normal)

how long it will take to run with dqn solver?

python run.py -s dqn -m train_dqn_gui

image

chuyangliu commented 4 years ago

It depends on the capacity of the machine (e.g., CPU, GPU, Memory) you use and how many steps you want to train the model. Training with GUI is just to give you a visual image of how the snake learns the steps. It's bad for training speed since rendering the GUI takes a lot of time. I would recommend using train_dqn instead of train_dqn_gui if you want to train the model faster.

If you want details of how to train the model or have any other questions, please feel free to follow up. 👍

zinwalin commented 4 years ago

It depends on the capacity of the machine (e.g., CPU, GPU, Memory) you use and how many steps you want to train the model. Training with GUI is just to give you a visual image of how the snake learns the steps. It's bad for training speed since rendering the GUI takes a lot of time. I would recommend using train_dqn instead of train_dqn_gui if you want to train the model faster.

If you want details of how to train the model or have any other questions, please feel free to follow up. 👍

it's a lot faster with train_dqn, thanks.

zinwalin commented 4 years ago

How can I check performance after training with train_dqn mode? I mean how can run in dqn mode with trained models?

chuyangliu commented 4 years ago

34