From 47c338c289bd256951989ca7c4e4145490480aa7 Mon Sep 17 00:00:00 2001 From: stone_tao Date: Sat, 4 Feb 2023 11:11:21 -0800 Subject: [PATCH] bug fixes --- ChangeLog.md | 4 ++++ luxai_s2/luxai_s2/actions.py | 2 +- luxai_s2/setup.py | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ChangeLog.md b/ChangeLog.md index d73c6983..4fab2bad 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -1,5 +1,9 @@ # ChangeLog +### v2.1.4 + +Fix bug with action formatter not handling lists + ### v2.1.3 Fix bug where calling reset with no seed crashes the engine. diff --git a/luxai_s2/luxai_s2/actions.py b/luxai_s2/luxai_s2/actions.py index afc6b59b..bfe4407d 100644 --- a/luxai_s2/luxai_s2/actions.py +++ b/luxai_s2/luxai_s2/actions.py @@ -189,7 +189,7 @@ def format_factory_action(a: int): def format_action_vec(a: np.ndarray): # (0 = move, 1 = transfer X amount of R, 2 = pickup X amount of R, 3 = dig, 4 = self destruct, 5 = recharge X) - a = a.astype(int) + a = np.array(a).astype(int) a_type = a[0] if a_type == 0: act = MoveAction(a[1], dist=1, repeat=a[4], n=a[5]) diff --git a/luxai_s2/setup.py b/luxai_s2/setup.py index 7f2ecda9..254e02e1 100644 --- a/luxai_s2/setup.py +++ b/luxai_s2/setup.py @@ -17,7 +17,7 @@ def read(fname): long_description="Code for the Lux AI Challenge Season 2", packages=find_packages(exclude="kits"), entry_points={"console_scripts": ["luxai-s2 = luxai_runner.cli:main"]}, - version="2.1.3", + version="2.1.4", python_requires=">=3.7", install_requires=[ "numpy",