Skip to content

Commit

Permalink
Basic mutli-agent environment implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
Mikel committed Nov 14, 2024
1 parent b032a54 commit 83e236d
Show file tree
Hide file tree
Showing 7 changed files with 641 additions and 9 deletions.
1 change: 1 addition & 0 deletions craftium/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from .craftium_env import CraftiumEnv
from .multiagent_env import MarlCraftiumEnv
from .wrappers import BinaryActionWrapper, DiscreteActionWrapper

from gymnasium.envs.registration import register, WrapperSpec
Expand Down
4 changes: 2 additions & 2 deletions craftium/craftium_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ def reset(
self.timesteps = 0

if self.mt_chann.is_open():
self.mt_chann.send_termination()
self.mt_chann.send_kill()
self.mt_chann.close_conn()
self.mt.close_pipes()
self.mt.wait_close()
Expand Down Expand Up @@ -225,7 +225,7 @@ def render(self):

def close(self):
if self.mt_chann.is_open():
self.mt_chann.send_termination()
self.mt_chann.send_kill()
self.mt_chann.close()
self.mt.close_pipes()
self.mt.wait_close()
Expand Down
Loading

0 comments on commit 83e236d

Please sign in to comment.