This is the in-class activity for Tuesday February 15.
The materials that you will need for this in-class activity are:
In Class Activity: Search Algorithms for Action Castle
Today in class we will walk through how to use search algorithms like Breadth-First Search (BFS) to solve text adventure games like Action Castle.
In order to do so, we’ll need to figure out:
- How to represent the state space for the game.
- How to list the possible moves at each turn in the game.
- How to use each possible move to generate a successor state.
- How to test whether we have reached the goal.
We’ll implement three functions that will allow us to use BFS to find the best sequence of commands in order to complete the game that we implemented in Homework 1.
What to do
- Open Search Algorithms for Action Castle.ipynb.
- Save a copy of it in your own drive by choosing
File > Save a Copy in Drive
from the Colab menu. This will ensure that your changes are saved.
- Implement the following functions:
get_state
get_available_actions
goal_test
- Please submit your work to Gradescope by Monday, February 21, 2022 before 11:59PM.