This repository contains a logic-based planning system for modeling and solving a frog-jumping puzzle using Answer Set Programming (ASP). The goal is to move frogs from their initial positions to specified target locations while following movement constraints.
The project consists of the following key files:
ranas.dl
– Defines the problem domain, including frogs, rocks, and movement rules.ranas.plan
– Specifies the initial state and goal conditions for the problem.ranas_world.plan
– Describes the fluents, actions, and constraints governing the movement of the frogs.dlv.mingw.exe
– Executable for the DLV solver.Ranas Super Saltarinas DLV.pdf
– Documentation about the problem and its solution.
To run the logic program, you need the DLV Answer Set Solver. If not included, you can download it from:
To execute the problem-solving process, use the DLV solver with the following command:
dlv ranas.dl ranas_world.plan ranas.plan -FP -N=15
- Fluents: Define the state of the system (e.g., frog positions).
- Actions: Describe valid movements for the frogs.
- Constraints: Prevent invalid moves, such as jumping onto an occupied position.
- Goal Conditions: Define the target state the system aims to reach.