Question: I am bulding a wall follwoing bot in python with 8 sensors: 1 indicating there is wall in square 0 if it is empty. This

I am bulding a wall follwoing bot in python with 8 sensors: 1 indicating there is wall in square 0 if it is empty.

I am bulding a wall follwoing bot in python with 8 sensors:

This bot should learn from positive experience sensors stored in a dictionary as so

1 indicating there is wall in square 0 if it is empty.

if the bot moves from (220, 220) to (220, 200) it has moves UP since the the Y directioin has DECREASED and it would have moved DOWN if the Y direction would have INCREASED.

I NEED TO MOVE THE INFORMATION ABOVE TO THE FOLLOWING DICTIONARY BY COMPARING THE TWO XY TUPLES TO SEE WHAT KIND OF MOVEMENT THE BOT HAS MADE

This bot should learn from positive experience sensors stored in a dictionary

MY PROBLEM IS ACCESSING THE SECOND X Y TUPLE IN POS_EXP_SENSORS. HOW WOULD I ACCESS IT AND COMPARE IT THE KEY?

SINCE myBot.pos_exp_sensors[xy] returns more than i need. How could i split it up and comapre it to the key??

CSE 512-Fall 2014Handout 2 A Stimulus-Response Agent Nils Nilsson: A simple wall-following robot "Find wall and follow forever Sensors s1, s2, s3,.. s8 with values 0 or 1 s2 s3 58 s1 S6 s5 Si S2 S3 S5 6 7 s8 Features-sensors settings combined): CSE 512-Fall 2014Handout 2 A Stimulus-Response Agent Nils Nilsson: A simple wall-following robot "Find wall and follow forever Sensors s1, s2, s3,.. s8 with values 0 or 1 s2 s3 58 s1 S6 s5 Si S2 S3 S5 6 7 s8 Features-sensors settings combined)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!