Question: Consider the clingo program blocks.lp below that is introduced in the Blocks World in ASP lecture. %%%%%%%%%%%%%%%%%%% % File: blocks.Ip: Blocks World %%%%%%%%%%%%%%%%%%% %%%%%% %%%%%%%%%%%%%%

 Consider the clingo program blocks.lp below that is introduced in the

Consider the clingo program blocks.lp below that is introduced in the Blocks World in ASP lecture. %%%%%%%%%%%%%%%%%%% % File: blocks.Ip: Blocks World %%%%%%%%%%%%%%%%%%% %%%%%% %%%%%%%%%%%%%% % sort and object declaration %%%%%%%%%%%%%%%%%% %%%%%%%%%% % every block is a location location(B) :-block(B). % the table is a location location(table). %%%%%%%% %%%%%%% % state description %%%%%%%%%%%%%%%%%%%%%%%%%% % two blocks can't be on the same block at the same time :- 2{on(BB,B.T)}, block(B), T = 0..m. %%%%% %%%%%%%%%%%%%%%%% % effect and preconditions of action %%%%%%%%%%%%%%%%%%% %%%%% % effect of moving a block on(B,L,T+1) :- move(BL,T). % concurrent actions are limited by num of grippers :- not {move(BB,LL,T)} grippers, T = 0..m-1. % a block can be moved only when it is clear :- move(BL,T), on(B1,B,T). % a block can't be moved onto a block that is being moved also :- move(B,B1,T), move(B1,L,T). %%%%%%%% %%%%%%%%%%%%%% % domain independent axioms %%%%%%%%%%%%%%%% 6%%%%%%%% % fluents are initially exogenous 1{on(B,LL,0):location(LL)}1 :- block(). % uniqueness and existence of value constraints :- not 1{on(B,LL,T)}1, block(B), T=1..m. % actions are exogenous {move(B,L,T)):- block(B), location(L), T = 0..m-1. % commonsense law of inertia {on(B,L,T+1) :-on(BL,T), T

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!