![]() ![]() So I tried this, which is practically the same thing: bottomBlock(X) :- \ above(X, _).ĮxactlyThree(X) :- above(X, Y), above(Y, Z), above (Z, W), bottomBlock(W). So X has exaclty three blocks beneath it if X is above a block Y, if Y is above a block Z, if Z is above a block W and block W is not above any block. Think back to how the program is supposed to work (operators with preconditions, add and delete lists applied to some world state) try and match this to the program. Have a look at the file and make sure you understand the structure of the program. So I started with: exactlyThree(X) :- above(X, Y), above(Y, Z), above (Z, W), \ above(W, _). This is the program discussed in the planning chapter of the course notes. So now I want to define a predicate that tells me if a certain block has exactly 3 blocks beneath it. The Entrance Over the past several class sessions we have been developing a blocks world model in which we have experimented with natural language input, reference resolution, state validation, acting, planning, and generating natural language output a large swath of cognitive processes In this challenge you will aim to improve what we have built in various respects, again exploring. ![]() So one block is above another block if there's some block beneath it that is on top of that block. ![]() The ask predicate takes a sentence as uses the np parser from before. The parser contains two predicates ask and act. Load these files as well as the blocks world and lexicon files that you wrote previously. I have a bunch of blocks, labeled a to f, and they're all stacked on top of each other, a being at the bottom and f all the way on top. Copy the Prolog parser which is in file as well as some utilities contained in. I'm trying to do something very simple in Prolog, but for some reason it's not working and I can't figure out why. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |