3.1 IR DE COMPRAS
Predicados:
At(place) – Señala que estamos en el lugar place
Have(thing) – Dice que tenemos thing
Sell(store, thing) – La tienda store vende la cosa thing
Operaciones:
OP {
Action: Go(there)
Precondition: At(here)
Effect: At(there) ^ ¬At(here)
}
OP {
Action: Buy(thing)
Precondition: At(store) ^ Sell(store, thing)
Effect: Have(thing)
}
Estado Inicial:
At(Home) ^ ¬Have(Milk) ^ ¬Have(Bananas) ^ ¬Have(Drill) ^ Sell(SM, Milk) ^ Sell(SM, Bananas) ^ Sell(HWS, Drill)
Estado Objetivo:
At(Home) ^ Have(Milk) ^ Have(Bananas) ^ Have(Drill)
3.2 EL MUNDO DE LOS CUBOS
Predicados:
cubo(x) - x es un cubo
brazoRobot(r) - r es un brazo robótico que puede sostener y mover cubos
sobreMesa(x) - cubo x está sobre la mesa
sobreCubo(x,y) - cubo x está sobre cubo y
nadaEncima(x) - cubo x no tiene nada sobre él mismo
sostener(x) - el brazo robot sostiene al cubo x
robotLibre(x) - el brazo robot no sostiene ningún cubo
Operaciones:
OP {
Action: TomarCubodeMesa(x)
Precondition:
nadaEncima(x) ^ cubo(x) ^ brazoRobot(r) ^ sobreMesa(x) ^ robotLibre(r)
Effects: sostener(x) ^ ¬ sobreMesa(x) ^ ¬ robotLibre(r)
}
OP {
Action: TomarCubodeOtroCubo(x,y)
Precondition:
nadaEncima(x) ^ cubo(x) ^ cubo(y) ^ brazoRobot(r) ^ sobreCubo(x,y) ^ robotLibre(r)
Effects: sostener(x) ^ nadaEncima(y) ^ ¬sobreCubo(x,y) ^ ¬ robotLibre(r)
}
OP {
Action: DejarSobreMesa(x)
Precondition: brazoRobot(r) ^ sostener(x) ^ cubo(x)
Effects: ¬sostener(x) ^ sobreMesa(x) ^ robotLibre(r)
}
OP {
Action: DejarSobreCubo(x,y)
Precondition: brazoRobot(r) ^ sostener(x) ^ cubo(x)
Effects: ¬sostener(x) ^ sobreCubo(x,y) ^ robotLibre(r)
}
Estado Inicial: Cualquier configuración de cubos sobre la mesa
cubo(A) cubo(B) cubo(C) sobreMesa(A) sobreMesa(B) sobreCubo(C,A) brazoRobot(r) robotLibre(r)
Estado Objetivo: Cualquier configuración diferente de cubos sobre la mesa
cubo(A) cubo(B) cubo(C) sobreMesa(C) sobreCubo(B,C) sobreCubo(A,B) brazoRobot(r) robotLibre(r)
3.3 EL MUNDO DE SHAKEY
El estado inicial de este problema es una configuración cualquiera de salones, cajas y Shakey. El estado objetivo es que todas las cajas y Shakey estén en el salón 1, todos los salones tengan las luces apagadas.
At(Room)
Señala que Shakey está en el cuarto Room.
LightOff(Room)
Señala que la luz está apagada en ese cuarto.
AreBoxes(NumberOfBoxes,Room)
Señala el número de cajas que hay en el cuarto, debe de haber al menos una para que Shakey apague la luz.
Initial State:
AtRoom(r3) ^ AreBoxes(4b,r 1)^¬LightOff(r1) ^LightOff(r2) ^LightOff(r3) ^¬LightOff(r4)
Gold State:
AtRoom(r1) ^ AreBoxes(4b,r 1)^LightOff(r1) ^LightOff(r2) ^LightOff(r3) ^LightOff(r4)
OP {
Action: Start
Precondition: {}
Effect: {Initial State}
}
OP {
Action: Finish
Precondition: {Gold State}
Effect: { }
}
OP {
Action: Go(rx)
Precondition: {At(ry)}
Effect: { At(rx)^¬At(ry)}
}
OP {
Action: TurnOffLight (Room)
Precondition: {¬LightOff(Room)^AreBoxes(b>=1,Room)}
Effect: { LightOff(Room)^ ¬LightOff(Room)}
}
OP {
Action: BringBox(rx,ry) //trae caja de rx a ry
Precondition: { AreBoxes(b>=1,rx)}
Effect: {AreBoxes(b-1,rx)^ AreBoxes(b+1,ry)^At(ry) }
}
No hay comentarios:
Publicar un comentario