Question: Please provide code in Lisp: Use LOCAL variables within functions ( e . g . , introduced by ' let' ) except for truly global

Please provide code in Lisp: 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 specified type or form
of the corresponding parameter, your function should return .
(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(e.g., low-res demo,
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"):
(CUBE A)(CUBE B)
(CUBE C)(CUBE D)
(BAR G)(BAR H)
(VERTICAL G)
(HORIZONTAL H)
(ON G )
(ON A )
(NEAR A G); "A is one unit to the right
of G; valid only for blocks on
(ON B A)
(ON C B),
(ON H C); This is "symmetrical"-ON
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 (not yet in this
assignment!) 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:
(TURN-VERTICAL G); applicable to horizontal bars
(PUT-ON G )
(PUT-NEAR A G); Assume this means "put A on ,1 unit right of G"
(PUT-ON B A)
(PUT-ON C B)
(PUT-ON D G)
(PUT-ON H C); for horizontal H, this means "put the middle of H on C.
 Please provide code in Lisp: Use LOCAL variables within functions (e.g.,

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!