Browse Source

Update threshold increasing

master
Kenneth Bruen 3 years ago
parent
commit
e8992f8b06
Signed by: kbruen
GPG Key ID: C1980A470C3EE5B1
  1. 4
      IDAstar.cs
  2. 14
      labyrinth.txt

4
IDAstar.cs

@ -177,7 +177,7 @@ namespace IdaStar
if (f > threshold) {
return f;
}
var min = f;
var min = int.MaxValue;
foreach(var neighbour in current.GetNeighbours()) {
if (!neighbour.IsInsideBox(_board.Count, _board[0].Count)) {
@ -218,7 +218,7 @@ namespace IdaStar
threshold = 0;
}
else {
threshold++;
threshold = newThreshold;
}
}
}

14
labyrinth.txt

@ -1,7 +1,7 @@
#### ###
#S #
##### ##
## #### #
# # #
##F####
####.###..
#S....#...
#####.##..
..........
##.####..#
#..#.....#
..##F####.

Loading…
Cancel
Save