Skip to content

Solver of a logic grid found on "Settimana Enigmistica" magazine modeled through the Answer Set Programming (ASP) approach.

Notifications You must be signed in to change notification settings

lorenzofavaro/logic-grid-solver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 

Repository files navigation

Logic-Grid-Solver

This is a logic grid solver for a logic grid puzzle sent by my boss during a Christmas vacation from work.

He sent it to me thinking I would solved it by hand. I could have done it but we all know that time is precious. So I wrote a little program following Answer Set Programming and had a lot of fun. To compute the answer sets it I used clingo.

Problem

Solution

clingo version 5.4.0
Reading from logic-grid-modeling.cl
Solving...
Answer: 1
elem(iene,11,tommaso,a5) elem(coccodrilli,13,luca,a4) elem(tigri,12,paolo,b5) elem(bufali,9,antonio,b4) elem(leoni,10,maurizio,c4)
SATISFIABLE
Models       : 1
Calls        : 1
Time         : 0.166s (Solving: 0.04s 1st Model: 0.02s Unsat: 0.02s)
CPU Time     : 0.141s

Reported from the computation, the solution is then:

About

Solver of a logic grid found on "Settimana Enigmistica" magazine modeled through the Answer Set Programming (ASP) approach.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages