Здесь показаны различия между двумя версиями данной страницы.
| Следующая версия | Предыдущая версия | ||
|
picobot_help [2017/03/07 18:14] super_admin создано |
picobot_help [2019/06/24 20:29] (текущий) |
||
|---|---|---|---|
| Строка 25: | Строка 25: | ||
| 1 ***S -> W 2 | 1 ***S -> W 2 | ||
| + | </code> | ||
| + | <code> | ||
| + | /* | ||
| + | * See this URL for lots of information about Picobot: | ||
| + | * | ||
| + | * http://www.cs.hmc.edu/~dodds/Picobot/index.html | ||
| + | */ | ||
| + | |||
| + | 2 // this indicates the map we want to start with | ||
| + | |||
| + | 0 xEW* -> N 0 // if in hallway with no options, keep going | ||
| + | //0 *x** -> E 1 // if you come to an opening on the right, turn | ||
| + | 0 xx** -> E 1 | ||
| + | 0 xEx* -> N 0 // if you come to an opening on the left, keep going | ||
| + | 0 NxW* -> E 1 // if you can't continue, try to turn right | ||
| + | 0 NEx* -> W 2 // " ", try to turn left | ||
| + | 0 Nxx* -> E 1 // if you can go either, choose right | ||
| + | 0 NEWx -> S 3 // if in deadend, turn around | ||
| + | |||
| + | |||
| + | 1 Nx*S -> E 1 // if in hallway with no options, keep going | ||
| + | 1 *x*x -> S 3 // if you come to an opening on the right, turn | ||
| + | 1 xx*S -> E 1 // if you come to an opening on the left, keep going | ||
| + | 1 NE*x -> S 3 // if you can't continue, try to turn right | ||
| + | 1 xE*S -> N 0 // " ", try to turn left | ||
| + | 1 xE*x -> S 3 // if you can go either, choose right | ||
| + | 1 NExS -> W 2 // if in deadend, turn around | ||
| + | |||
| + | |||
| + | 2 N*xS -> W 2 // if in hallway with no options, keep going | ||
| + | 2 x*x* -> N 0 // if you come to an opening on the right, turn | ||
| + | 2 N*xx -> W 2 // if you come to an opening on the left, keep going | ||
| + | 2 x*WS -> N 0 // if you can't continue, try to turn right | ||
| + | 2 N*Wx -> S 3 // " ", try to turn left | ||
| + | 2 x*Wx -> N 0 // if you can go either, choose right | ||
| + | 2 NxWS -> E 1 // if in deadend, turn around | ||
| + | |||
| + | |||
| + | 3 *EWx -> S 3 // if in hallway with no options, keep going | ||
| + | 3 **xx -> W 2 // if you come to an opening on the right, turn | ||
| + | 3 *xWx -> S 3 // if you come to an opening on the left, keep going | ||
| + | 3 *ExS -> W 2 // if you can't continue, try to turn right | ||
| + | 3 *xWS -> E 1 // " ", try to turn left | ||
| + | 3 *xxS -> W 2 // if you can go either, choose right | ||
| + | 3 xEWS -> N 0 // if in deadend, turn around | ||
| </code> | </code> | ||