Plate13
Unit 2 · Topic 2 of 10
Search problem
Easy, 6 min, 7 steps
Step 1 of 7 State
State
In the maze a state is the cell the agent is in: a row and a column. The initial state is S. The map has 60 open cells, so there are 60 states.
Tap a part of the scene to see its details here.
class Labirent:def __init__(self, harita):self.h = haritaself.baslangic = (0, 0)def eylemler(self, d):r, c = dadaylar = [(r-1, c), (r, c+1),(r+1, c), (r, c-1)]return [a for a in adaylarif self.acik(a)]def sonuc(self, d, eylem):return eylemdef hedef_mi(self, d):return d == (6, 11)def maliyet(self, eylem):if self.camur(eylem):return 3return 1
- durumSayisi
- 60
- eylemSayisi
- 2
- yolUzunlugu
- 0
- maliyet
- 0