Following is a discussion pertaining to Challenge 3 Task 4.
In a blocks world including cones which cannot be stacked on top of as well as the ability to indicate whether a
block is to the left or right of another block, one would add facts to indicate the existence of each cone and their
absolute/relative locations such as:
cone(c1).
color(c1, red).
size(c1, small).
order_number(c1, 1).
cone(c2).
color(c2, blue).
color(c2, large).
order_number(c2, 2).
etc...
in order to begin representing the initial state of the world. A rule for comparing the order_number of each
different block and representing something like is_to_the_left(c1, c2) would be convenient as well. Additional
definitions would need to be created as well for parsing to be able to occur, such as:
noun(n(cone)) --> [cone].
adj(a(left))) --> [left].
noun(n(left)) --> [left].
etc...
As a result of this addition, the natural language generation rules would need to be updated to write relevant
output if a cone is being interacted with instead of a block. Similarly, rather than taking input in the form
nlg(Block), perhaps it would be more appropriate to alter the rule to become nlg(Object), as natural language
generation would no longer be limited to blocks alone. This minor representational change could be applied in other
parts of the program as well, such as in the perform(Verb, Block, State, NewState) rule,
validate(Verb, Block, State), perform(Verb, Block, State, NewState), etc.
Reference resolution would need to take into account the order_number of blocks, possibly needing a three adjective
rule for particular situations.
Validation would need only minor changes if the 'clear' rule asserted that any cone is not clear, as nothing can
be placed on top of a cone. Similarly, for the perform rule, it would be necessary to make sure that nothing is put
on top of a cone.
In order to ask the system whether a certain action can be performed, one would need to take the current
state of the world and do reference resolution/validation based on the input of the user without actually
performing the action.