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.
This bot should learn from positive experience sensors stored in a dictionary as so
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
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started