Rank Teamname Points # Wins Agents


Attention 1: If you can't submit your agent in the system, please send the agent to liujl@sustech.edu.cn and htong6@outlook.com directly. 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 liujl@sustech.edu.cn and htong6@outlook.com 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.


Contact support@aingames.cn if your find a bug about the system. Thanks!!!
Attention 2: You'd better use Python 3.6 and the pytorch is suggested in the agent. But if you are more familiar with tensorflow, you can also use it.

Naming policy and submission

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

Affiliations