Skip to content

Conversation

@helloKep
Copy link
Collaborator

I've made one change in two files:

pathfinding-subnodes.lp

%:- end(Z,(X,Y),_),     not path(Z,_,(X,Y,_),h).
:- end(Z,(X,Y),_),     not path(Z,_,(X,Y,_),_).

pathfinding-functions.lp

%:- end(Z,C,_),     not path(Z,_,C,h).
:- end(Z,C,_),     not path(Z,_,C,_).

A brief history

I tried testing these encodings on the benchmark environments and was surprised when they didn't work, since the encodings look fine and also work on the example environment.

I made the edits shown above and still was not able to get a satisfiable solution.

I tested it on envs/lp/test.lp with h=25 and it did not work but then with h=40 it did work.

I returned to benchmarks/environments/Test_00/Level_3.lp and made a temporary modification to comment out all but the first train. With h=200 it was unsatisfiable. I counted exactly how many steps would be needed (26) and set h=26 and got a solution. A solution existed also for h=27 and h=28, but not for h=25 (unsurprisingly). Solutions still existed at h=50 and h=100 but not at h=200.

I restored benchmarks/environments/Test_00/Level_3.lp to have all seven trains and tried different values for h. 60, 70, and 90 failed, but h=100 produced a result. Without the changes above, the result is unsatisfiable.

@helloKep helloKep changed the base branch from main to t/wip January 15, 2026 09:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants