Commit 91b79eb3 authored by Siddhartha Laghuvarapu's avatar Siddhartha Laghuvarapu
Browse files

Fix logging

parent e09c945f
......@@ -48,7 +48,7 @@ class BaselineRandomAgent:
class ScriptedBaselineMultiAgent(NeuralMMOMultiAgent):
def __init__(self):
self.agent_types = ["scripted" for i in range(max_agents)]
self.agent_types = ["scripted" for i in range(8)]
self.config = projekt.config.SmallMaps()
max_agents = 8
......
......@@ -207,13 +207,14 @@ def run_episode(player_index, agents, N_TIME_STEPS):
def print_statistics(player_statistics, episode):
for agent_id in player_statistics:
for agent_id,stats in enumerate(player_statistics):
print("======= Episode {} Agent Id {} =======".format(episode + 1, agent_id))
print("Achievement ", player_statistics["Achievement"])
print("Equipment ", player_statistics["Equipment"])
print("Exploration ", player_statistics["Exploration"])
print("PlayerKills ", player_statistics["PlayerKills"])
print("Foraging ", player_statistics["Foraging"])
print("Achievement ", stats["Achievement"])
print("Equipment ", stats["Equipment"])
print("Exploration ", stats["Exploration"])
print("PlayerKills ", stats["PlayerKills"])
print("Foraging ", stats["Foraging"])
print("=========================")
print("==================================================")
......@@ -222,7 +223,7 @@ if __name__ == "__main__":
player_agent, opponent_agents = load_agents(LocalEvaluationConfig)
player_agent = player_agent[0]
N_EPISODES = 2
N_TIME_STEPS = 1024
N_TIME_STEPS = 102
for episode in range(N_EPISODES):
agents, player_index = assign_agents(player_agent, opponent_agents)
statistics = run_episode(player_index, agents, N_TIME_STEPS)
......
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