Commit 30ba08d8 authored by Siddhartha Laghuvarapu's avatar Siddhartha Laghuvarapu
Browse files

Change agents in players.yaml

parent 4beb4afe
......@@ -128,4 +128,6 @@ dmypy.json
.pyre/
#NeuralMMO repository
neural-mmo/
neural-mmo/forge/embyr
neural-mmo/docs
neural-mmo/resource
......@@ -14,11 +14,10 @@ class NeuralBaselineAgent(NeuralMMOAgent):
def register_reset(self, observations):
obs = {0:observations}
actions,self.state,_ = self.trainer.compute_actions(obs,state={},policy_id='policy_0')
# action = self.get_action(observations)
return actions[0]
def compute_action(self, observations, info=None):
def compute_action(self, observations):
obs = {0:observations}
actions,self.state,_ = self.trainer.compute_actions(obs,state={},policy_id='policy_0')
# action = self.get_action(observations)
return actions[0]
......@@ -10,14 +10,13 @@ class RandomNeuralMMOAgent(NeuralMMOAgent):
self.action_space = get_action_spaces()
def register_reset(self, observations):
action = self.get_action(observations)
return action
def compute_action(self, observations, info=None):
action = self.get_action(observations)
action = FlexDict(defaultdict(FlexDict))
for atn in sorted(self.action_space):
for arg in sorted(atn.edges):
action[atn][arg] = self.action_space[atn][arg].sample()
return action
def get_action(self, observations):
def compute_action(self, observations):
action = FlexDict(defaultdict(FlexDict))
for atn in sorted(self.action_space):
for arg in sorted(atn.edges):
......
......@@ -17,12 +17,18 @@ opponent_agents:
agent_2:
file: scripted_baseline_agent
agent_class: BaselineForageAgent
agent_class: BaselineCombatAgent
agent_type: scripted
num_agents: 51
num_agents: 45
agent_3:
file: random_agent
agent_class: RandomNeuralMMOAgent
agent_type: neural
num_agents: 6
agent_4:
file: scripted_baseline_agent
agent_class: BaselineForageAgent
agent_class: BaselineRandomAgent
agent_type: scripted
num_agents: 26
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment