From 8b03169272670eb85bf39e59ba0daa62eb633b40 Mon Sep 17 00:00:00 2001 From: siddarthsingh1 Date: Mon, 8 Jan 2024 17:56:51 +0200 Subject: [PATCH] chore: remove extra lmabda function --- jumanji/environments/routing/pacman/utils.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/jumanji/environments/routing/pacman/utils.py b/jumanji/environments/routing/pacman/utils.py index 0420aef77..3d5f26adf 100644 --- a/jumanji/environments/routing/pacman/utils.py +++ b/jumanji/environments/routing/pacman/utils.py @@ -370,11 +370,8 @@ def check_collisions( old_ghost_pos: chex.Array, ) -> Tuple[chex.Array, chex.Numeric, chex.Numeric, chex.Numeric, chex.Numeric]: """Check if ghost has collided with player""" - eat = lambda: True - no_eat = lambda: False frightened_time = state.frightened_state_time - - is_eat = jax.lax.cond(frightened_time > 0, eat, no_eat) + is_eat = frightened_time > 0 ghost_p = Position(y=ghost_pos[0], x=ghost_pos[1]) old_ghost_p = Position(y=old_ghost_pos[0], x=old_ghost_pos[1])