use DIR_POS length for direction generation

This commit is contained in:
mos 2025-01-11 14:51:38 +01:00
parent 556fc664bc
commit 63fe0d5d5c
1 changed files with 1 additions and 3 deletions

View File

@ -349,10 +349,8 @@ impl Agent {
const INACTIVE_PENALTY: f32 = 0.0010;
const BOX_DIFF: f32 = 1024.0;
const DIR_TABLE: &'static [u32] = &[0, 1, 2, 3];
fn chromo() -> u32 {
Self::DIR_TABLE[rnd!(Self::DIR_TABLE.len())]
rnd!(State::DIR_POS.len()) as u32
}
fn with_dna(state: State, dna: Vec<u32>) -> Self {