mirror of
https://github.com/dancojocaru2000/ai-project-idastar.git
synced 2025-02-23 00:49:34 +02:00
Update threshold increasing
This commit is contained in:
parent
57c4728e6a
commit
e8992f8b06
2 changed files with 9 additions and 9 deletions
|
@ -177,7 +177,7 @@ namespace IdaStar
|
||||||
if (f > threshold) {
|
if (f > threshold) {
|
||||||
return f;
|
return f;
|
||||||
}
|
}
|
||||||
var min = f;
|
var min = int.MaxValue;
|
||||||
|
|
||||||
foreach(var neighbour in current.GetNeighbours()) {
|
foreach(var neighbour in current.GetNeighbours()) {
|
||||||
if (!neighbour.IsInsideBox(_board.Count, _board[0].Count)) {
|
if (!neighbour.IsInsideBox(_board.Count, _board[0].Count)) {
|
||||||
|
@ -218,7 +218,7 @@ namespace IdaStar
|
||||||
threshold = 0;
|
threshold = 0;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
threshold++;
|
threshold = newThreshold;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#### ###
|
####.###..
|
||||||
#S #
|
#S....#...
|
||||||
##### ##
|
#####.##..
|
||||||
|
..........
|
||||||
## #### #
|
##.####..#
|
||||||
# # #
|
#..#.....#
|
||||||
##F####
|
..##F####.
|
||||||
|
|
Loading…
Add table
Reference in a new issue