email@example.com. Thanks! The first time we will feedback.
1. Now, the submit system is in lazy mode. You can submit your agent anytime. And we will update the result of your agent as fast as we can. So, try your best to gurantee your agent without any bug.
2. If the agent has any bug during the validation process, we will feedback all bug information.
You can email to
firstname.lastname@example.org if you have any confusion.
3. Please remeber to obey the following rule, or you will no score.
4. Once we have result, we will inform you by email and list the result in the table above.
email@example.com your find a bug about the system. Thanks!!!
If you don't obey rules about format of agents submitted, you will have no result.
Rule 1: You need to submit your
agent with a
Teamname.zip. E.g. if your teamname is smartgame, your submitted agent is
smartgame.zip. All files related to your agent need to be included in your package.
Rule 2: In your
package, it must have one agent file in python named
Agent.py. In your python file including
one class named
Agent and the class must include a class method named act(self, stateObs,
actions). An example for random agent is shown below.
Agent and the class must include a class method named
act(self, stateObs, actions).
An example for random agent is shown below.
from random import randint class Agent(): def __init__(self): self.name = "randomAgent" def act(self, stateObs, actions): action_id = randint(0,len(actions)-1) return action_id
Rule 3: We will import your agent from your submitted file, and the performance of your agnet will be validated by the following script.
#!/usr/bin/env python import gym import gym_gvgai import Agent as Agent testing_times = 20 # Predefined names referring to framework games = ['gvgai-cec1', 'gvgai-cec2', 'gvgai-cec3'] training_levels = ['lvl0-v0', 'lvl1-v0'] test_levels = ['lvl2-v0', 'lvl3-v0', 'lvl4-v0'] for game_name in games: for level in test_levels: env = gym_gvgai.make(game_name + '-'+level) agent = Agent.Agent() print('Starting ' + env.env.game + " with Level " + str(env.env.lvl)) total_score = list() # record every testing score # reset environment actions = env.env.GVGAI.actions() state_obs = None for i in range(testing_times): # testing 100 times current_score = 0 # record current testing round score state_obs = env.reset() for t in range(1000): # env.render() # choose action based on trained policy action_id = agent.act(state_obs, actions) # do action and get new state and its reward state_obs, incre_score, done, debug = env.step(action_id) current_score += incre_score # print("Action "+str(action_id)+" tick "+str(t+1)+" reward "+str(increScore)+" win "+debug["winner"]) # break loop when terminal state is reached if done: print("Game over at game tick "+str(t+1)+" with player "+debug['winner']+", score is "+str(current_score)) total_score.append(current_score) break print(sum(total_score) / len(total_score))
Rule 4: The multi-prepocessing is not allowed
in this competition and you can not import
os, sys package in your agent