pub struct MorphogenesisEngine {
pub config: Arc<RwLock<GrowthConfig>>,
pub organisms: Arc<RwLock<Vec<Organism>>>,
pub field: Arc<RwLock<MorphogenField>>,
pub generation: Arc<RwLock<u32>>,
pub evolution_history: Arc<RwLock<Vec<f64>>>,
}Expand description
A fő morfogenetikus motor
Fields§
§config: Arc<RwLock<GrowthConfig>>Konfiguráció
organisms: Arc<RwLock<Vec<Organism>>>Organizmus populáció
field: Arc<RwLock<MorphogenField>>Morfogén mező
generation: Arc<RwLock<u32>>Generációs számláló
evolution_history: Arc<RwLock<Vec<f64>>>Evolúciós történet (legjobb fitness per generáció)
Implementations§
Source§impl MorphogenesisEngine
impl MorphogenesisEngine
Sourcepub fn set_config(&self, config: GrowthConfig)
pub fn set_config(&self, config: GrowthConfig)
Konfiguráció beállítása
Sourcepub fn set_field(&self, field: MorphogenField)
pub fn set_field(&self, field: MorphogenField)
Morfogén mező beállítása
Sourcepub fn grow_from_seed(
&self,
seed: &Seed,
pattern: Option<GrowthPattern>,
) -> Organism
pub fn grow_from_seed( &self, seed: &Seed, pattern: Option<GrowthPattern>, ) -> Organism
Organizmus növesztése egy seed-ből
Sourcepub fn evolve_population(
&self,
seeds: &[Seed],
generations: u32,
objective: &FitnessObjective,
population_size: usize,
) -> Vec<Organism>
pub fn evolve_population( &self, seeds: &[Seed], generations: u32, objective: &FitnessObjective, population_size: usize, ) -> Vec<Organism>
Populáció evolúciója generációkon keresztül Minden generáció:
- Fitness kiértékelés
- Szelekció (legjobb N marad)
- Keresztezés (seed paraméterek keverése)
- Mutáció (növekedési paraméterek véletlenszerű változtatása)
- Új organizmusok növesztése
Sourcepub fn prune_weak(&self, organism: &mut Organism, threshold: f64) -> usize
pub fn prune_weak(&self, organism: &mut Organism, threshold: f64) -> usize
Pruning: gyenge ágak eltávolítása
Sourcepub fn get_best_organism(&self) -> Option<Organism>
pub fn get_best_organism(&self) -> Option<Organism>
Legjobb organizmus lekérése
Sourcepub fn evolution_summary(&self) -> Vec<(u32, f64)>
pub fn evolution_summary(&self) -> Vec<(u32, f64)>
Evolúciós történet lekérése
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MorphogenesisEngine
impl RefUnwindSafe for MorphogenesisEngine
impl Send for MorphogenesisEngine
impl Sync for MorphogenesisEngine
impl Unpin for MorphogenesisEngine
impl UnsafeUnpin for MorphogenesisEngine
impl UnwindSafe for MorphogenesisEngine
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more