add medium and big data set to python slitherlink example
This commit is contained in:
@@ -2,7 +2,31 @@ from ortools.constraint_solver import pywrapcp
|
||||
from collections import deque
|
||||
|
||||
|
||||
small = [[3, 2, -1, 3], [-1, -1, -1, 2], [3, -1, -1, -1], [3, -1, 3, 1]]
|
||||
small = [[3, 2, -1, 3],
|
||||
[-1, -1, -1, 2],
|
||||
[3, -1, -1, -1],
|
||||
[3, -1, 3, 1]]
|
||||
|
||||
medium = [[ -1, 0, -1, 1, -1, -1, 1, -1 ],
|
||||
[ -1, 3, -1, -1, 2, 3, -1, 2 ],
|
||||
[ -1, -1, 0, -1, -1, -1, -1, 0 ],
|
||||
[ -1, 3, -1, -1, 0, -1, -1, -1 ],
|
||||
[ -1, -1, -1, 3, -1, -1, 0, -1 ],
|
||||
[ 1, -1, -1, -1, -1, 3, -1, -1 ],
|
||||
[ 3, -1, 1, 3, -1, -1, 3, -1 ],
|
||||
[ -1, 0, -1, -1, 3, -1, 3, -1 ]]
|
||||
|
||||
big = [[ 3, -1, -1, -1, 2, -1, 1, -1, 1, 2 ],
|
||||
[ 1, -1, 0, -1, 3, -1, 2, 0, -1, -1 ],
|
||||
[ -1, 3, -1, -1, -1, -1, -1, -1, 3, -1 ],
|
||||
[ 2, 0, -1, 3, -1, 2, 3, -1, -1, -1 ],
|
||||
[ -1, -1, -1, 1, 1, 1, -1, -1, 3, 3 ],
|
||||
[ 2, 3, -1, -1, 2, 2, 3, -1, -1, -1 ],
|
||||
[ -1, -1, -1, 1, 2, -1, 2, -1, 3, 3 ],
|
||||
[ -1, 2, -1, -1, -1, -1, -1, -1, 2, -1 ],
|
||||
[ -1, -1, 1, 1, -1, 2, -1, 1, -1, 3 ],
|
||||
[ 3, 3, -1, 1, -1, 2, -1, -1, -1, 2 ]]
|
||||
|
||||
|
||||
|
||||
def NeighboringArcs(i, j, h_arcs, v_arcs):
|
||||
@@ -275,3 +299,5 @@ def SlitherLink(data):
|
||||
|
||||
if __name__ == '__main__':
|
||||
SlitherLink(small)
|
||||
SlitherLink(medium)
|
||||
SlitherLink(big)
|
||||
|
||||
Reference in New Issue
Block a user