forked from bkujawa/WdSI-LAB01
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathIState.cs
78 lines (62 loc) · 2.15 KB
/
IState.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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Laboratory1 {
// Some comment
public interface IState {
#region Properties
/// <summary>
/// Minimalna gwarantowana wygrana dla gracza maksymalizującego.
/// </summary>
double Alpha { get; set; }
/// <summary>
/// Maksymalna gwarantowana wygrana dla gracza minimalizującego.
/// </summary>
double Beta { get; set; }
/// <summary>
/// Zwraca i ustawia potomków danego stanu.
/// </summary>
List<IState> Children { get; set; }
/// <summary>
/// Zwraca lub ustawia głębokość stanu w drzwie.
/// </summary>
double Depth { get; set; }
/// <summary>
/// Zwraca f. f = g + h.
/// </summary>
double F { get; }
/// <summary>
/// Zwraca i ustawia g - koszt osiągnięca wybranego stanu.
/// </summary>
double G { get; set; }
/// <summary>
/// Zwraca h - heurystyczną wartość dla stanu.
/// </summary>
double H { get; }
/// <summary>
/// Nazwa statnu jednoznacznie go identyfikująca.
/// </summary>
string ID { get; }
/// <summary>
/// Definiuje czy wybrany stan jest dostępnu. W grach jak sudoku wybrany stan może być nie osiągalny.
/// </summary>
bool IsAdmissible { get; }
/// <summary>
/// Zwraca i ustawia przodka danego stanu.
/// </summary>
IState Parent { get; set; }
/// <summary>
/// Zwraca lub ustawia zazwę początkowego ruchu pozwalającego na dojście do tego stanu.
/// </summary>
string RootMove { get; set; }
#endregion //end Properties
#region Methods
/// <summary>
/// Oblicza h - heurystyczną wartość dla danego stanu.
/// </summary>
/// <returns>Heurystyczna wartość.</returns>
double ComputeHeuristicGrade();
#endregion //end Methods
}
}