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
54 lines (52 loc) · 1.65 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
using System.Text.Json.Serialization;
namespace EnemyGenerator
{
/// This struct holds the parameters of the evolutionary enemy generator.
public struct Parameters
{
/// The seed that initializes the random generator.
[JsonInclude]
public int seed { get; }
/// The maximum number of generations.
[JsonInclude]
public int generations { 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 mutation chance of a single gene.
[JsonInclude]
public int geneMutation { get; }
/// The number of competitors of the tournament selection.
[JsonInclude]
public int competitors { get; }
/// The aimed difficulty of the enemies.
[JsonInclude]
public float difficulty { get; }
/// Parameters constructor.
public Parameters(
int _seed,
int _generations,
int _population,
int _intermediate,
int _mutation,
int _geneMutation,
int _competitors,
float _difficulty
) {
seed = _seed;
generations = _generations;
population = _population;
intermediate = _intermediate;
mutation = _mutation;
geneMutation = _geneMutation;
competitors = _competitors;
difficulty = _difficulty;
}
}
}