PDA

View Full Version : الگوریتم جاروبرقی



sedigh_zarei
یک شنبه 18 مهر 1389, 15:17 عصر
سلام دوستان
کسی میتونه در مورد برنامه جارو برقی بدون حسگر در هوش مصنوعی توضیحاتی بده؟

MOJGAN.
دوشنبه 19 مهر 1389, 20:56 عصر
function reflex-Vacuum-Agent([location,status]) returns an action
if status=dirty then return suck
else if location=A then return right
else if location=B then return left


nInitial state: Any state can be designated as the initial state.
nSuccessor function: This generates the legal states that result from trying the three actions (Left, Right, and Suck).

nGoal test: This checks whether all the squares are clean.
nPath cost: Each step costs 1, so the path cost is the number of steps in the path.