4. Load Models locally - Pommerman/pytorch-pommerman-rl GitHub Wiki

Copy the trained model from GCP server to local laptop

# run it on your local laptop
scp -C -p pommerman:/data/pytorch-pommerman-rl/trained_models/a2c/PommeFFACompetitionFast-v0.pt ./trained_models/a2c/PommeFFACompetitionFast-v0.pt

Demo the model in your local laptop

cd pytorch-pommerman-rl
python enjoy.py --env-name PommeFFACompetitionFast-v0 --load-path ./trained_models/a2c/PommeFFACompetitionFast-v0.pt

Configure the players in the code

cd pytorch-pommerman-rl/envs


# find the following code in pommerman.py and manual change the player number from 4 to 2 or vice versa
def make_env(config):
    training_agent = TrainingAgent()
    agent_list = [
        training_agent,
        pommerman.agents.SimpleAgent(),
        pommerman.agents.SimpleAgent(),
        pommerman.agents.SimpleAgent(),
    ]