Fix warnings and code cleanup/fixes (#13570)

This commit is contained in:
Visne
2023-01-19 03:56:45 +01:00
committed by GitHub
parent 3ca5a0224b
commit c6d3e4f3bd
265 changed files with 499 additions and 666 deletions

View File

@@ -7,14 +7,14 @@ public class MutationSystem : EntitySystem
[Dependency] private readonly IRobustRandom _robustRandom = default!;
/// <summary>
// Main idea: Simulate genetic mutation using random binary flips. Each
// seed attribute can be encoded with a variable number of bits, e.g.
// NutrientConsumption is represented by 5 bits randomly distributed in the
// plant's genome which thermometer code the floating value between 0.1 and
// 5. 1 unit of mutation flips one bit in the plant's genome, which changes
// NutrientConsumption if one of those 5 bits gets affected.
//
// You MUST clone() seed before mutating it!
/// Main idea: Simulate genetic mutation using random binary flips. Each
/// seed attribute can be encoded with a variable number of bits, e.g.
/// NutrientConsumption is represented by 5 bits randomly distributed in the
/// plant's genome which thermometer code the floating value between 0.1 and
/// 5. 1 unit of mutation flips one bit in the plant's genome, which changes
/// NutrientConsumption if one of those 5 bits gets affected.
///
/// You MUST clone() seed before mutating it!
/// </summary>
public void MutateSeed(SeedData seed, float severity)
{