-
Notifications
You must be signed in to change notification settings - Fork 0
/
hColMax.cs
33 lines (31 loc) · 1012 Bytes
/
hColMax.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
using FlashPlanner.Core.Heuristics;
using FlashPlanner.Core.Models;
using FlashPlanner.Core.Models.SAS;
using FlashPlanner.Core.States;
namespace FlashPlanner.Core.HeuristicsCollections
{
/// <summary>
/// Based on the <seealso href="https://www.fast-downward.org/Doc/Evaluator">max Evaluator</seealso>
/// </summary>
public class hColMax : BaseHeuristicCollection
{
/// <summary>
/// Main constructor
/// </summary>
/// <param name="heuristics"></param>
public hColMax(List<IHeuristic> heuristics) : base(heuristics)
{
}
internal override uint GetValueInner(StateMove parent, SASStateSpace state, List<Operator> operators)
{
uint max = 0;
foreach (var heuristic in Heuristics)
{
var hValue = heuristic.GetValue(parent, state, operators);
if (hValue > max)
max = hValue;
}
return max;
}
}
}