{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Problem-Solving Agents (Section 3.1)\n",
"\n",
"Goal-based agents for which states of the environment are considered\n",
"as atomic representations, ones with no visible internal structure.\n",
"\n",
"Formulating the search problem. We assume\n",
" * environment's state is **observable**\n",
" * environment's state is **discrete**\n",
" * environment is **deterministic**\n",
" * environment is **sequential**\n",
" * environment is **static**\n",
" * **single** agent\n",
"\n",
"Problem definition:\n",
" * set of possible states\n",
" * initial state\n",
" * possible actions available at each state\n",
" * transition model, from state, action pair to next state\n",
" * goal test\n",
" * path cost, in this chapter assumed to be sum of step costs\n",
"\n",
"Definition of state set is critical. Want enough detail to enable\n",
"discovery of useful solution, but want minimal detail to ensure a\n",
"practical search.\n",
"\n",
"Consider the [sliding tile 8-puzzle](http://www.tilepuzzles.com/default.asp?p=12). Example of \n",
" * too much detail\n",
" * a state includes positions of every tile, orientation in three dimensions of puzzle, time of day, what you had for breakfast, the age of your older sister\n",
" * too little detail\n",
" * state is either \"initial\" or \"solved\"\n",
"\n",
"How would you write the problem definition for our simple graph?\n",
" * set of possible states?\n",
" * initial state?\n",
" * possible actions available at each state?\n",
" * goal test?\n",
" * path cost?\n",
"\n",
"How would you write the problem definition for the [8 or 15 puzzle](http://en.wikipedia.org/wiki/Fifteen_puzzle)?\n",
" * set of possible states?\n",
" * initial state?\n",
" * possible actions available at each state?\n",
" * goal test?\n",
" * path cost?\n",
"\n",
"How would you write the problem definition for the [Towers of Hanoi puzzle?](http://en.wikipedia.org/wiki/Tower_of_Hanoi)\n",
" * set of possible states?\n",
" * initial state?\n",
" * possible actions available at each state?\n",
" * goal test?\n",
" * path cost?\n",
"\n",
"How would you write the problem definition for the [Peg Board Puzzle](http://pegboardgame.blogspot.com/)?\n",
" * set of possible states?\n",
" * initial state?\n",
" * possible actions available at each state?\n",
" * goal test?\n",
" * path cost?\n",
"\n",
"How would you write the problem definition for scheduling 10 different observations using the [Hubble Space Telescope](https://arxiv.org/pdf/1810.04815.pdf)?\n",
" * set of possible states?\n",
" * initial state?\n",
" * possible actions available at each state?\n",
" * goal test?\n",
" * path cost?"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Ways of searching a graph to find path from start to goal node?\n",
"\n",
"Uninformed search means that the choice of action is not \"informed\" by any knowledge of the goal.\n",
"\n",
"Breadth-first search completely explores each level of the search space before proceeding to the next.\n",
"\n",
"Depth-first search completely explores a path until it ends, then backs up a level and tries again."
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"scrolled": false
},
"outputs": [
{
"data": {
"text/html": [
"\n",
"