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

Add neural baseline agent

parent 9c7e5386
......@@ -31,11 +31,11 @@ class NeuralBaselineMultiAgent(NeuralMMOMultiAgent):
self.config = projekt.config.CompetitionRound2()
max_agents = 8
self.agent_types = ["neural" for i in range(max_agents)]
self.agents = [loadModel(self.config) for i in range(max_agents)]
self.agent = loadModel(self.config)
def register_reset(self, observations, agent_idx):
agent_observations = observations[agent_idx]
actions, self.state, _ = self.agents[agent_idx].compute_actions(
actions, self.state, _ = self.agent.compute_actions(
{0: agent_observations}, state={}, policy_id="policy_0"
)
return actions[0]
......
......@@ -2,7 +2,7 @@ from agents import NeuralBaselineMultiAgent, ScriptedBaselineMultiAgent, Scripte
class LocalEvaluationConfig:
player_agents = [ScriptedBaselineMultiAgentRandom]
player_agents = [NeuralBaselineMultiAgent]
opponents = []
opponents += [ScriptedBaselineMultiAgent] * 15
......
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