Skip to content

Commit

Permalink
some info in README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
mensch72 committed Feb 4, 2024
1 parent c942b5a commit 0d48fbf
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# satisfia

Satisficing-based Intelligent Agents

## Requirements
Expand All @@ -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.

4 changes: 2 additions & 2 deletions scripts/test_simple_gridworld.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ 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)
env.render()
#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([' ', ' ', ' ', '#', '#', ',', '^', '~'])
Expand Down
2 changes: 1 addition & 1 deletion src/world_model/simple_gridworld.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0d48fbf

Please sign in to comment.