Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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.

image text in transcribed

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

image text in transcribed

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

image text in transcribed

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Inference Control In Statistical Databases From Theory To Practice Lncs 2316

Authors: Josep Domingo-Ferrer

2002nd Edition

3540436146, 978-3540436140

More Books

Students also viewed these Databases questions