diff --git a/README.md b/README.md index 1fa294a..bda5409 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ # satisfia + Satisficing-based Intelligent Agents ## Requirements @@ -8,3 +9,14 @@ tested with: - gymnasium 0.29.0 - pygame 2.5.0 - mujoco-py 2.1.2.14 + +## Getting started + +### Running around a very simple gridworld and a larger random gridworld: +``` +python scripts/test_simple_gridworld.py +``` + +### Adding more gridworlds: +Open `src/environments/very_simple_gridworlds.py` and add another `elif` section. + \ No newline at end of file diff --git a/scripts/test_simple_gridworld.py b/scripts/test_simple_gridworld.py index cc7a5c9..06675c9 100644 --- a/scripts/test_simple_gridworld.py +++ b/scripts/test_simple_gridworld.py @@ -20,7 +20,7 @@ def move_randomly(env): print("Goal reached!") break -# test creation of a simple gridworld: +print("\nRUNNING AROUND GW5:") env, aleph0 = make_simple_gridworld(gw = "GW5") #, render_mode = "human") env.reset() move_randomly(env) @@ -28,7 +28,7 @@ def move_randomly(env): #time.sleep(5) env.close() -# run around a random grid until the agent reaches the goal: +print("\nRUNNING AROUND A RANDOM GRID:") grid = [ [ random.choice([' ', ' ', ' ', '#', '#', ',', '^', '~']) diff --git a/src/world_model/simple_gridworld.py b/src/world_model/simple_gridworld.py index 746ef59..575121f 100644 --- a/src/world_model/simple_gridworld.py +++ b/src/world_model/simple_gridworld.py @@ -244,7 +244,7 @@ def _extract_state_attributes(self, state): ) # TODO: extract object states and/or object locations def _set_state(self, state): - """Set the current state to the last state encoded in the given result.""" + """Set the current state to the provided one.""" self._state = state self.t, loc, prev_loc, imm_states = self._extract_state_attributes(state) self._agent_location = loc