Commit 901f3916 authored by Antonio Andriella's avatar Antonio Andriella
Browse files

domain_skt

parent d793435b
(define (domain game-strips)
(:requirements :strips)
(:requirements :typing)
(:requirements :equality)
(:requirements :fluents)
(:requirements :conditional-effects)
(:types block - object
from - location
level - engagement_level
robot patient - user
gripper hand - gripper
)
(:constants LEV1 - engagement_level
LEV2 - engagement_level
LEV3 - engagement_level
LEV4 - engagement_level
)
(:predicates
(at ?x - object ?y - location)
(free ?x - gripper)
(carry ?x - user ?y - gripper ?z - object)
(piece ?x - object)
(loc ?x - location)
(gripper ?x - gripper)
(catch ?x - object ?y - location)
(free_loc ?x - location)
(agent ?x - user)
(userMove ?x - object ?y ?z - location)
(allowedMove ?x - object ?y ?z - location)
(suggestMove ?x - object ?y - location)
(suggestSolution ?x - object ?y - location)
(demonstrateMove ?x - object ?y - location)
(engagement ?level - engagement_level)
(demonstrationEngagement)
(checkMove)
(verbalEngagement ?level - engagement_level)
(verbalEngagement_1 ?level - engagement_level)
(verbalEngagement_2 ?level - engagement_level)
(verbalEngagement_3 ?level - engagement_level)
(verbalEngagement_4 ?level - engagement_level)
(releasedblock ?x - object ?y ?z - location)
(encourageUser)
(sendTricks)
(suggestSubset)
(suggestAnswer)
(performDemonstration)
(waitForUserMove)
(rightMove)
)
(:action encourage_user
:parameters( )
:precondition(and (verbalEngagement LEV1))
:effect(and (waitForUserMove)
)
)
(:action suggest_subsets_user
:parameters( ?block - object ?from_1 ?from_2 ?from_3 - location)
:precondition(and (verbalEngagement LEV2) (not(= ?from_1 ?from_2)) (not(= ?from_1 ?from_3)) (not(= ?from_2 ?from_3)) (loc ?from_1) (loc ?from_2) (loc ?from_3) (suggestMove ?block ?from_1) (suggestMove ?block ?from_2) (suggestMove ?block ?from_3) (piece ?block))
:effect(and (waitForUserMove)
)
)
(:action suggest_solution_user
:parameters( ?block - object ?from - location)
:precondition(and (loc ?from) (verbalEngagement LEV3) (suggestAnswer) (suggestSolution ?block ?from) (piece ?block))
:effect(and (waitForUserMove)
)
)
(:action demonstrate_how_to_perform_move
:parameters( ?block - object ?from - location)
:vars(?level - engagement_level)
:precondition(and (loc ?from) (verbalEngagement LEV4) (performDemonstration) (demonstrateMove ?block ?from) (piece ?block))
:effect(and (waitForUserMove)
)
)
(:action grab
:parameters( ?patient - user ?hand - gripper ?block - object ?from ?to - location ?level - engagement_level)
:precondition(and (waitForUserMove) (verbalEngagement ?level) (at ?block ?from) (userMove ?block ?from ?to) (piece ?block) (agent ?patient) (loc ?from) (loc ?to) (not(free_loc ?from)) (free_loc ?to) (not(catch ?block ?from )))
:effect (and (not(free ?hand)) (at ?block ?from) (catch ?block ?from) (not(carry ?patient ?hand ?block))
)
)
(:action move
:parameters( ?patient - user ?hand - gripper ?block - object ?from ?to - location ?level - engagement_level)
:precondition(and (not(checkMove)) (verbalEngagement ?level) (loc ?from) (loc ?to) (agent ?patient) (catch ?block ?from) (userMove ?block ?from ?to))
:effect (and (not(checkMove)) (not(at ?block ?from)) (carry ?patient ?hand ?block)
)
)
(:action move_is_correct
:parameters( ?patient - user ?hand - gripper ?block - object ?from ?to - location ?level - engagement_level)
:precondition(and(piece ?block) (verbalEngagement ?level) (loc ?from) (not(checkMove)) (carry ?patient ?hand ?block) (catch ?block ?from) (verbalEngagement ?level) (userMove ?block ?from ?to) (allowedMove ?block ?from ?to) )
:effect(and (rightMove) (not(waitForUserMove)) (checkMove)
)
)
(:action move_is_not_correct
:parameters( ?patient - user ?hand - gripper ?block - object ?from ?to - location ?level - engagement_level)
:precondition(and(piece ?block) (verbalEngagement ?level) (loc ?from) (loc ?to) (not(checkMove)) (carry ?patient ?hand ?block) (catch ?block ?from) (verbalEngagement ?level) (userMove ?block ?from ?to) (not(allowedMove ?block ?from ?to)) )
:effect (and(not(rightMove)) (not(waitForUserMove)) (checkMove)
)
)
(:action release_block_correct_position
:parameters( ?patient - user ?hand - gripper ?block - object ?from ?to - location ?level - engagement_level)
:precondition (and (piece ?block) (checkMove) (rightMove) (verbalEngagement ?level) (allowedMove ?block ?from ?to) (userMove ?block ?from ?to) (agent ?patient) (catch ?block ?from) (loc ?from) (loc ?to) (not(free ?hand)) (gripper ?hand) (carry ?patient ?hand ?block))
;:effect(DEBUG)
;:effect(and (at ?block ?to) (free ?gripper) (not(select ?block ?to)) (not(free_loc ?to)) (not(catch ?block ?from ?to)) (not(carry ?agent ?gripper ?block)))
:effect (and (rightMove) (at ?block ?from) (releasedblock ?block ?from ?to)
)
)
(:action release_block_wrong_position
:parameters( ?patient - user ?hand - gripper ?block - object ?from ?to - location ?level - engagement_level)
:precondition (and (piece ?block) (not(rightMove)) (checkMove) (verbalEngagement ?level) (not(allowedMove ?block ?from ?to)) (userMove ?block ?from ?to) (agent ?patient) (catch ?block ?from) (loc ?from) (not(free ?hand)) (gripper ?hand) (carry ?patient ?hand ?block))
:effect (and (not(rightMove)) (not(allowedMove ?block ?from ?to)) (releasedblock ?block ?from ?to)
)
)
)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment