The wall-hugging robot:
Program a toy robot to follow a wall. The figure shown below describes the assumptions. In a simplified version of ‘turtle geometry’, the robot’s world is a grid; any square is either free or occupied by the ‘wall’. The robot, shown as a triangle, is positioned on a free square facing in one of four possible directions. The robot consists of two binary sensors: h (‘head’, a touch sensitive bumper) signals whether the square is in front of the robot is free (0) or occupied by the wall (1); r (right) gives the same information for the square to the right of the robot. Robot is capable of two primitive actions: R turns right by 90° whereas remaining on the same square; F (forward) advances one square in the robot’s present direction.
Figure: i) The city wall and ii) the predicate ‘wall to the rear-right’.
The robot should be programmed to find out a piece of wall, then endlessly cycle all along within the wall, hugging it with right side. The given finite state machine, represented in tabular form, resolves the problem.
Seek: precondition = true, post-condition = ‘wall to the rear-right’
r h Actions Next state1 - Track- 1 RRR Track0 0 F Seek
Track: precondition = post-condition = ‘wall to the rear-right’
r h Actions Next state0 - RF Track1 0 F Track1 1 RRR TrackThe robot begins in state Seek, not knowing anything regarding its position, as stated by the vacuous assertion “precondition = true”. Function of this state is to bring about the post-condition ‘wall to the rear-right’, described in figure above: There is a piece of wall to the right of robot, or diagonally to the rear-right, or both. As long as robot hasn’t sensed any piece of wall (r = 0, h = 0) it moves forward with F. When it senses a wall, either ahead or to the right, it positions itself so as to fulfill the post-condition ‘wall to the rear-right’. With the ‘don’t care’ notation “-” we follow the design principle ‘specify behavior just as far as required’ and make the robot non-deterministic.
The mathematically inclined reader might find it instructive to confirm the program correct by checking that the state Track maintains the invariant ‘wall to the rear-right’, and that, in each and every transition, the robot progresses in his march all along the wall. Here we just point out how some basic ideas of the theory of computation, of algorithms and programs can be described in a simple, playful setting whose rules are rapidly understood.
Latest technology based Theory of Computation Online Tutoring Assistance
Tutors, at the www.tutorsglobe.com, take pledge to provide full satisfaction and assurance in Theory of Computation help via online tutoring. Students are getting 100% satisfaction by online tutors across the globe. Here you can get homework help for Theory of Computation, project ideas and tutorials. We provide email based Theory of Computation help. You can join us to ask queries 24x7 with live, experienced and qualified online tutors specialized in Theory of Computation. Through Online Tutoring, you would be able to complete your homework or assignments at your home. Tutors at the TutorsGlobe are committed to provide the best quality online tutoring assistance for Theory of Computation Homework help and assignment help services. They use their experience, as they have solved thousands of the Theory of Computation assignments, which may help you to solve your complex issues of Theory of Computation. TutorsGlobe assure for the best quality compliance to your homework. Compromise with quality is not in our dictionary. If we feel that we are not able to provide the homework help as per the deadline or given instruction by the student, we refund the money of the student without any delay.
Find 24/7 online assistance of PhD tutors and History of Christianity Assignment Help now for high academic grades at viable prices.
tutorsglobe.com electronegativity scales assignment help-homework help by online chemical periodicity tutors
www.tutorsglobe.com offers tutorial and concepts in general linear programming problem glpp, standard linear programming problems and steps to change glpp to slpp, assignment help, homework help
TDMA in Mobile Phone Systems - 2G Systems (Several 2G cellular systems, along with the remarkable exception of IS-95, are relies on GSM, D-AMPS, TDMA, PDC, IDEN, and PHS is instances of TDMA cellular systems.), 3G Systems.
theory and lecture notes on dc sources, energy and power all along with the key concepts of ideal voltage source, ideal current source, energy expenditure, power dissipation. tutorsglobe offers homework help, assignment help and tutor’s assistance on dc sources, energy and power.
Theory and lecture notes of Exponential Functions and Their Graphs all along with the key concepts of Translations of Exponential Graphs, The natural base e, Compounded Interest, Continuous Compounding. Tutorsglobe offers homework help, assignment help and tutor’s assistance on Functions and Their Graphs.
Junction Field Effect Transistors tutorial all along with the key concepts of JFET characteristic curves, Operation of JFET device, JFET as an amplifier, bipolar junction transistor, single stage class A amplifier circuits
tutorsglobe.com types of heavy chain assignment help-homework help by online structure and characteristics of antibodies tutors
tutorsglobe.com extraction from gold ores assignment help-homework help by online occurrence and principles of extraction of gold tutors
www.tutorsglobe.com offers properties of amines homework help, properties of amines assignment help, online tutoring assistance, organic chemistry solutions by online qualified tutor's help.
tutorsglobe.com criticism of consumers surplus assignment help-homework help by online consumer surplus tutors
tutorsglobe.com epistasis assignment help-homework help by online genetics tutors
tutorsglobe.com thalamus assignment help-homework help by online position of flower tutors
Theory and lecture notes of Real GDP all along with the key concepts of Real gdp, Gross, Domestic, Product, Categorization of gdp. Tutorsglobe offers homework help, assignment help and tutor’s assistance on Real GDP.
www.tutorsglobe.com offers crystalline solids homework help, crystalline solids assignment help, online tutoring assistance, organic chemistry solutions by online qualified tutor's help.
1955820
Questions Asked
3689
Tutors
1466883
Questions Answered
Start Excelling in your courses, Ask an Expert and get answers for your homework and assignments!!