Answered step by step
Verified Expert Solution
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 eg 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; ie
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 longstanding experimental domain in AI eg
going back to Terry Winograd's "SHRDLU" a name based on letter frequencies
in
Georgiy Platonov and Ben Kane, experimented in a physical blocks world, focusing on question answering about spatial relations eg "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, neuralnetbased 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 D Blocks World, given descriptions of those structures. In Lisp
we'll do some preliminary programming to enable this. Here is an example
of a block structure call it a "springboard":
For now, assume that we have exactly unit "cubes", A B C D E F and "bars" G H of length 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:
TURNVERTICAL G; applicable to horizontal bars
PUTON G TABLE
PUTNEAR A G; Assume this means "put A on TABLE unit right of G
PUTON B A
PUTON C B
PUTON D G
PUTON H C; for horizontal H this means "put the middle of H on C
PUTNEAR X Y "put X one unit to the right of Yie YX 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 ways of placing blocks on the table
in definite relative positions. The second way will be PUTNEXTTO 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 NEXTTO X Y meaning that that X & Y
are on the table, and X is adjacent to Y on the right of Y ie YX
Even though NEAR X Y and NEXTTO X Y entail that X Y are on the table, we still specify ON X TABLEON Y TABLE explicitly.
Note that we'll also allow baroncube or baronbar placements like
PUTON H C ie put bar H on C so that its center of gravity is
shifted unit leftward from the center of gravity of C;
Result for a valid action: ON H C;
PUTON H C ie put bar H on C so that its center of gravity is
shifted 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 H C;
PUTON H C ie put bar H on C so that its center of gravity is
shifted unit right from the center of gravity of C;
Result for a valid action: ON H C;
PUTON H C ie put bar H on C so that its center of gravity is
shifted 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 H C;
PUTON and PUTON will also be usable for placing a cube or vertical
bar on the leftmost rd or rightmost rd of a horizontal bar while as
noted, PUTON C H
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