This repository has been archived by the owner on Feb 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Parameters.cs
81 lines (79 loc) · 2.49 KB
/
Parameters.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
79
80
81
using System.Text.Json.Serialization;
namespace LevelGenerator
{
/// This struct holds the parameters of the evolutionary level generator.
public struct Parameters
{
/// The seed that initializes the random generator.
[JsonInclude]
public int seed { get; }
/// The maximum time.
[JsonInclude]
public int time { get; }
/// The initial population size.
[JsonInclude]
public int population { get; }
/// The intermediate population size.
[JsonInclude]
public int intermediate { get; }
/// The mutation chance.
[JsonInclude]
public int mutation { get; }
/// The number of competitors of tournament selection.
[JsonInclude]
public int competitors { get; }
/// If it is true, the sparsity weights the positions with the number
/// of enemies in the respective room.
[JsonInclude]
public bool weight { get; }
/// If it is true, the standard deviation will consider all the rooms
/// where enemies can be placed.
[JsonInclude]
public bool inclusive { get; }
/// The aimed number of rooms.
[JsonInclude]
public int rooms { get; }
/// The aimed number of keys.
[JsonInclude]
public int keys { get; }
/// The aimed number of locks.
[JsonInclude]
public int locks { get; }
/// The aimed number of enemies.
[JsonInclude]
public int enemies { get; }
/// The aimed linear coefficient.
[JsonInclude]
public float linearCoefficient { get; }
/// Parameters constructor.
public Parameters(
int _seed,
int _time,
int _population,
int _intermediate,
int _mutation,
int _competitors,
bool _weight,
bool _inclusive,
int _rooms,
int _keys,
int _locks,
int _enemies,
float _linearCoefficient
) {
seed = _seed;
time = _time;
population = _population;
intermediate = _intermediate;
mutation = _mutation;
competitors = _competitors;
weight = _weight;
inclusive = _inclusive;
rooms = _rooms;
keys = _keys;
locks = _locks;
enemies = _enemies;
linearCoefficient = _linearCoefficient;
}
}
}