-- Nov 8 In-Class Exercise
Init (At (C1, SFO) ^ At (C2, JFK) ^ At (C3, EWR) ^ At (P1, SFO) ^ At (P2, JFK) ^ At (P3, EWR)
^ Cargo (C1) ^ Cargo(C2) ^ Cargo(C3) ^ Plane (P1) ^ Plane (P2) ^ Plane (P3)
^ Airport (JFK) ^ Airport (SFO) ^ Airport (EWR))
Goal ( At (C1, JFK) ^ At (C2, SFO) ^ At (C3, SFO))
Solution:
[Load(C1, P1, SFO), Fly(P1, SFO, JFK), Unload(C1, P1, JFK),
Load(C2, P2, JFK), Fly(P2, JFK, SFO), Unload(C2, P2, SFO)
Load(C3, P3, EWR), Fly(P3, EWR, SFO), Unload(C3, P3, SFO)]
(
Edited: 2017-11-08)
Init (At (C1, SFO) ^ At (C2, JFK) ^ At (C3, EWR) ^ At (P1, SFO) ^ At (P2, JFK) ^ At (P3, EWR)
^ Cargo (C1) ^ Cargo(C2) ^ Cargo(C3) ^ Plane (P1) ^ Plane (P2) ^ Plane (P3)
^ Airport (JFK) ^ Airport (SFO) ^ Airport (EWR))
Goal ( At (C1, JFK) ^ At (C2, SFO) ^ At (C3, SFO))
Solution:
[Load(C1, P1, SFO), Fly(P1, SFO, JFK), Unload(C1, P1, JFK),
Load(C2, P2, JFK), Fly(P2, JFK, SFO), Unload(C2, P2, SFO)
Load(C3, P3, EWR), Fly(P3, EWR, SFO), Unload(C3, P3, SFO)]