% aibo planner v. 1.2 beta % Jul 8 2004 % by Christian Nastasi nastasichr@yahoo.it % Alessio Guerrieri tarlosk@libero.it % typical call: lparse planXaibo12.sm | smodels % lparse planXaibo12_f1.sm planXaibo12_f2.sm planXaibo12_f3.sm | smodels % This planner is based on the work of Luca Padovani % File name: planXaibo12_f1.sm % Descrition: This File implement the first part of % aibo_planner witch describes % mainly "initially" and "finally". %%%% Change Log % Jul 9 2004 : Add the action "wait_on_goal" in the action declaration, % this allow the inertial statement to work correctly. % % Jul 10 2004 : The position of the cherger become a ground facts; % this reduce computational load while charger position now is not a fluent. %%% Plan Settings %%% const length=1. const goal_value=p1. const initial_position=r1. const initial_orientation=west. %%% Atoms declaration %%% %%Step time(0..length). % Levels level_kind(high). level_kind(mid). level_kind(low). % robot orientation orientation(north). orientation(south). orientation(est). orientation(west). %Valid objects robot(aibo). %Charger position charger_at(r11). %%% 20 rooms - they are connected with the relative hallway point room_point(r1). room_point(r2). room_point(r3). room_point(r4). room_point(r5). room_point(r6). room_point(r7). room_point(r8). room_point(r9). room_point(r10). room_point(r11). room_point(r12). room_point(r13). room_point(r14). room_point(r15). room_point(r16). room_point(r17). room_point(r18). room_point(r19). room_point(r20). %%% Passage ways - they are the corridor passage_way_point(p1). passage_way_point(p2). passage_way_point(p3). passage_way_point(p4). passage_way_point(p5). passage_way_point(p6). passage_way_point(p7). passage_way_point(p8). passage_way_point(p9). passage_way_point(p10). passage_way_point(p11). passage_way_point(p12). passage_way_point(p13). passage_way_point(p14). passage_way_point(p15). passage_way_point(p16). passage_way_point(p17). passage_way_point(p18). passage_way_point(p19). passage_way_point(p20). %%%%% Adjacents - they define connection %%% In this example the corridor is connected in a ring topology %%% adj(pos1, pos2, orientation) adjacent(p1,p2,south). adjacent(p2,p3,south). adjacent(p3,p4,south). adjacent(p4,p5,south). adjacent(p5,p6,south). adjacent(p6,p7,west). adjacent(p7,p8,west). adjacent(p8,p9,west). adjacent(p9,p10,north). adjacent(p10,p11,north). adjacent(p11,p12,north). adjacent(p12,p13,north). adjacent(p13,p14,north).adjacent(p14,p15,north). adjacent(p15,p16,east). adjacent(p16,p17,east).adjacent(p17,p18,east). adjacent(p18,p19,east). adjacent(p19,p20,east). adjacent(p20,p1,south). adjacent(r1,p1,west). adjacent(r2,p2,west). adjacent(r3,p3,west). adjacent(r4,p4,west).adjacent(r5,p5,west). adjacent(r6,p6,west). adjacent(r7,p7,north). adjacent(r8,p8,north).adjacent(r9,p9,north). adjacent(r10,p10,east). adjacent(r11,p11,east). adjacent(r12,p12,east). adjacent(r13,p13,east). adjacent(r14,p14,east). adjacent(r15,p15,east). adjacent(r16,p16,south). adjacent(r17,p17,south). adjacent(r18,p18,south). adjacent(r19,p19,south). adjacent(r20,p20,south). %%% Initially Description - This are the group of fluents which %are considered true at the beginning of the state transaction initially(battery_level(high)). initially(is_at(aibo,initial_position)). initially(is_oriented(aibo,initial_orientation)). % normally, rooms are open initially(accessible(R)) :- room_point(R), not initially(neg(accessible(R))). % passage_way_point are always accessible initially(accessible(P)) :- passage_way_point(P). % exception to the above default initially(neg(accessible(r4))). % Finally Description - GOALs fluents witch determins the output conditions finally(is_at(Rob,goal_value)) :- robot(Rob).