Merge remote-tracking branch 'origin/dev' into bugfix/2449-observation-where
This commit is contained in:
@@ -14,36 +14,36 @@ parameters:
|
|||||||
- name: matrix
|
- name: matrix
|
||||||
type: object
|
type: object
|
||||||
default:
|
default:
|
||||||
- job_name: 'UbuntuPython38'
|
# - job_name: 'UbuntuPython38'
|
||||||
py: '3.8'
|
# py: '3.8'
|
||||||
img: 'ubuntu-latest'
|
# img: 'ubuntu-latest'
|
||||||
every_time: false
|
# every_time: false
|
||||||
publish_coverage: false
|
# publish_coverage: false
|
||||||
- job_name: 'UbuntuPython310'
|
- job_name: 'UbuntuPython310'
|
||||||
py: '3.10'
|
py: '3.10'
|
||||||
img: 'ubuntu-latest'
|
img: 'ubuntu-latest'
|
||||||
every_time: true
|
every_time: true
|
||||||
publish_coverage: true
|
publish_coverage: true
|
||||||
- job_name: 'WindowsPython38'
|
# - job_name: 'WindowsPython38'
|
||||||
py: '3.8'
|
# py: '3.8'
|
||||||
img: 'windows-latest'
|
# img: 'windows-latest'
|
||||||
every_time: false
|
# every_time: false
|
||||||
publish_coverage: false
|
# publish_coverage: false
|
||||||
- job_name: 'WindowsPython310'
|
# - job_name: 'WindowsPython310'
|
||||||
py: '3.10'
|
# py: '3.10'
|
||||||
img: 'windows-latest'
|
# img: 'windows-latest'
|
||||||
every_time: false
|
# every_time: false
|
||||||
publish_coverage: false
|
# publish_coverage: false
|
||||||
- job_name: 'MacOSPython38'
|
# - job_name: 'MacOSPython38'
|
||||||
py: '3.8'
|
# py: '3.8'
|
||||||
img: 'macOS-latest'
|
# img: 'macOS-latest'
|
||||||
every_time: false
|
# every_time: false
|
||||||
publish_coverage: false
|
# publish_coverage: false
|
||||||
- job_name: 'MacOSPython310'
|
# - job_name: 'MacOSPython310'
|
||||||
py: '3.10'
|
# py: '3.10'
|
||||||
img: 'macOS-latest'
|
# img: 'macOS-latest'
|
||||||
every_time: false
|
# every_time: false
|
||||||
publish_coverage: false
|
# publish_coverage: false
|
||||||
|
|
||||||
stages:
|
stages:
|
||||||
- stage: Test
|
- stage: Test
|
||||||
|
|||||||
@@ -28,6 +28,8 @@ class PrimaiteGymEnv(gymnasium.Env):
|
|||||||
super().__init__()
|
super().__init__()
|
||||||
self.game_config: Dict = game_config
|
self.game_config: Dict = game_config
|
||||||
"""PrimaiteGame definition. This can be changed between episodes to enable curriculum learning."""
|
"""PrimaiteGame definition. This can be changed between episodes to enable curriculum learning."""
|
||||||
|
self.io = PrimaiteIO.from_config(game_config.get("io_settings", {}))
|
||||||
|
"""Handles IO for the environment. This produces sys logs, agent logs, etc."""
|
||||||
self.game: PrimaiteGame = PrimaiteGame.from_config(copy.deepcopy(self.game_config))
|
self.game: PrimaiteGame = PrimaiteGame.from_config(copy.deepcopy(self.game_config))
|
||||||
"""Current game."""
|
"""Current game."""
|
||||||
self._agent_name = next(iter(self.game.rl_agents))
|
self._agent_name = next(iter(self.game.rl_agents))
|
||||||
@@ -36,9 +38,6 @@ class PrimaiteGymEnv(gymnasium.Env):
|
|||||||
self.episode_counter: int = 0
|
self.episode_counter: int = 0
|
||||||
"""Current episode number."""
|
"""Current episode number."""
|
||||||
|
|
||||||
self.io = PrimaiteIO.from_config(game_config.get("io_settings", {}))
|
|
||||||
"""Handles IO for the environment. This produces sys logs, agent logs, etc."""
|
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def agent(self) -> ProxyAgent:
|
def agent(self) -> ProxyAgent:
|
||||||
"""Grab a fresh reference to the agent object because it will be reinstantiated each episode."""
|
"""Grab a fresh reference to the agent object because it will be reinstantiated each episode."""
|
||||||
@@ -168,6 +167,8 @@ class PrimaiteRayMARLEnv(MultiAgentEnv):
|
|||||||
"""
|
"""
|
||||||
self.game_config: Dict = env_config
|
self.game_config: Dict = env_config
|
||||||
"""PrimaiteGame definition. This can be changed between episodes to enable curriculum learning."""
|
"""PrimaiteGame definition. This can be changed between episodes to enable curriculum learning."""
|
||||||
|
self.io = PrimaiteIO.from_config(env_config.get("io_settings"))
|
||||||
|
"""Handles IO for the environment. This produces sys logs, agent logs, etc."""
|
||||||
self.game: PrimaiteGame = PrimaiteGame.from_config(copy.deepcopy(self.game_config))
|
self.game: PrimaiteGame = PrimaiteGame.from_config(copy.deepcopy(self.game_config))
|
||||||
"""Reference to the primaite game"""
|
"""Reference to the primaite game"""
|
||||||
self._agent_ids = list(self.game.rl_agents.keys())
|
self._agent_ids = list(self.game.rl_agents.keys())
|
||||||
@@ -187,9 +188,6 @@ class PrimaiteRayMARLEnv(MultiAgentEnv):
|
|||||||
{name: agent.action_manager.space for name, agent in self.agents.items()}
|
{name: agent.action_manager.space for name, agent in self.agents.items()}
|
||||||
)
|
)
|
||||||
|
|
||||||
self.io = PrimaiteIO.from_config(env_config.get("io_settings"))
|
|
||||||
"""Handles IO for the environment. This produces sys logs, agent logs, etc."""
|
|
||||||
|
|
||||||
super().__init__()
|
super().__init__()
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
|||||||
Reference in New Issue
Block a user