Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please provide the solution in Lisp Code. - Use LOCAL variables within functions ( e . g . , introduced by 'let' ) except for

Please provide the solution in Lisp Code.
- Use LOCAL variables within functions (e.g., introduced by 'let')
except for truly global parameters (such as a hash table) that multiple
functions need to access.
- Unless stated otherwise, include type checking in your functions; i.e.,
if the user gives an argument which is not of the specied type or form
of the corresponding parameter, your function should return **ERROR**.
(More generally one might print more specific error messages.)
PREPARING FOR BUILDING BLOCK STRUCTURES
-------------------------------
Preamble
-------
The "Blocks World", where an AI system builds structures with children's
blocks on a table is a long-standing experimental domain in AI, e.g.,
going back to Terry Winograd's "SHRDLU" (a name based on letter frequencies)
in 1968-71.
Georgiy Platonov and Ben Kane, experimented in a physical blocks world, focusing on question answering about spatial relations (e.g., "Which blocks are to the left of a red block?"), as well as about past situations, and enabling structural concept learning, etc.
The Blocks World domain is interesting from a reasoning and planning
perspective, because it involves precisely the kinds of problems for
which current LLMs fail miserably. However, neural-net-based systems
specifically designed for virtual Blocks World problems have been built
successfully. Once suitable data structures and models of possible
moves and relationships in such a virtual domain have been engineered,
a DNN can be "let loose", experimenting with millions of moves and
configurations, thereby learning what moves lead to what configurations.
But one feels that with more reasoning power and spatial conceptualization,
success should not depend on such massive experimentation.
We will be working towards the ability to create block structures in
a 2-D Blocks World, given descriptions of those structures. In Lisp1
we'll do some preliminary programming to enable this. Here is an example
of a block structure (call it a "springboard"): (attached)
For now, assume that we have exactly 6 unit "cubes", {A, B, C, D, E, F} and 2 "bars" {G, H} of length 3. Our eventual aim will be to specify how structures like the one above can be built step by step, one block at a time. For the example this might be:
1.(TURN-VERTICAL G); applicable to horizontal bars
2.(PUT-ON G *TABLE*)
3.(PUT-NEAR A G); Assume this means "put A on *TABLE*,1 unit right of G"
4.(PUT-ON B A)
4.(PUT-ON C B)
6.(PUT-ON D G)
7.(PUT-ON H C); for horizontal H, this means "put the middle of H on C".
(PUT-NEAR X Y)-- "put X one unit to the right of Y"(i.e, Y_X) will
require Y to be already on the table, and X to not be in use as yet.
This action will be one of only 2 ways of placing blocks on the table
in definite relative positions. The second way will be (PUT-NEXT-TO X Y),
which again requires Y to already be on the table, and X to not be in
use as yet; its result will be (NEXT-TO X Y), meaning that that X & Y
are on the table, and X is adjacent to Y on the right of Y, i.e., YX.
(Even though (NEAR X Y) and (NEXT-TO X Y) entail that X, Y are on the table, we still specify (ON X *TABLE*),(ON Y *TABLE*) explicitly.)
Note that we'll also allow bar-on-cube (or bar-on-bar) placements like
(PUT-ON-1 H C), i.e., put bar H on C so that its center of gravity is
shifted 1 unit leftward from the center of gravity of C;
Result (for a valid action): (ON-1 H C);
(PUT-ON-2 H C), i.e., put bar H on C so that its center of gravity is
shifted 2 units leftward from the center of gravity of C;
("legal" only if another support for H is already in place);
Result (for a valid action): (ON-2 H C);
(PUT-ON+1 H C), i.e., put bar H on C so that its center of gravity is
shifted 1 unit right from the center of gravity of C;
Result (for a valid action): (ON+1 H C);
(PUT-ON+2 H C), i.e., put bar H on C so that its center of gravity is
shifted 2 units right from the center of gravity of C;
("legal" only if another support for H is already in place).
Result (for a valid action): (ON+1 H C);
PUT-ON-1 and PUT-ON+1 will also be usable for placing a cube or vertical
bar on the leftmost 3rd or rightmost 3rd of a horizontal bar (while, as
noted, (PUT-ON C H)
image text in transcribed

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

How Do I Use A Database Research Tools You Can Use

Authors: Laura La Bella

1st Edition

1622753763, 978-1622753765

More Books

Students also viewed these Databases questions

Question

Question 2 In Linux, what process has the PID of 1 ?

Answered: 1 week ago

Question

How can the Internet be helpful in a job search? (Objective 2)

Answered: 1 week ago