MCPcopy Create free account

hub / github.com/andrinr/evo / functions

Functions220 in github.com/andrinr/evo

↓ 1 callersMethodrecord_death
Records an organism's death and adds it to the graveyard. Only organisms that lived long enough (age >= 0.5) are added. Maintains graveyard sorted by
src/simulation/evolution.rs:54
↓ 1 callersMethodreset_attack_cooldown
Resets the attack cooldown timer. # Arguments `cooldown_time` - Cooldown duration in seconds
src/simulation/organism/organism.rs:293
↓ 1 callersMethodseed_empty_pools
Seeds empty pools with organisms from non-empty pools.
src/simulation/ecosystem.rs:904
↓ 1 callersMethodselect_pool_weighted_by_size
Selects a pool ID weighted by pool size (larger pools more likely).
src/simulation/ecosystem.rs:874
↓ 1 callersMethodset_last_update_time
(&mut self, time: f32)
src/ui/ui.rs:62
↓ 1 callersMethodsexual_count
Number of sexual deaths tracked
src/simulation/reproduction.rs:104
↓ 1 callersMethodthink
(&self, inputs: &Array1<f32>)
src/simulation/brain/mod.rs:92
↓ 1 callersMethodto_screen_relative
( &self, params: &Params, ui_panel_width: f32, camera_zoom: f32, )
src/graphics.rs:223
↓ 1 callersMethodtotal_input_size
Returns the total number of brain inputs produced by all senses. # Arguments `params` - Simulation parameters # Returns The sum of input sizes fro
src/simulation/organism/perception.rs:85
↓ 1 callersFunctionupdate_and_render
( eco: &simulation::ecosystem::Ecosystem, params: &mut Params, ui_state: &mut ui::UIState, )
src/main.rs:205
↓ 1 callersMethodupdate_history
( &mut self, ecosystem: &simulation::ecosystem::Ecosystem, params: &Params, )
src/ui/ui.rs:70
↓ 1 callersMethodupdate_pool_ages_internal
( &mut self, ecosystem: &simulation::ecosystem::Ecosystem, params: &Params, )
src/ui/ui.rs:139
↓ 1 callersMethodupdate_pool_scores_internal
( &mut self, ecosystem: &simulation::ecosystem::Ecosystem, params: &Params, )
src/ui/ui.rs:98
↓ 1 callersFunctionwrap
Applies periodic wrapping to a DNA value. # Arguments `value` - DNA value (may be outside [0, 1]) # Returns Wrapped value in [0, 1]
src/simulation/dna.rs:40
Methodage_by
Increments the organism's age. # Arguments `dt` - Time delta in seconds
src/simulation/organism/organism.rs:251
Methodasexual_reproduction
Performs asexual reproduction (cloning with mutation).
src/simulation/evolution.rs:379
Methodasexual_reproduction_indexed
Performs asexual reproduction (indexed version for living organisms).
src/simulation/evolution.rs:484
Methodavg_asexual_delta
Average score improvement for asexual reproduction (last N deaths)
src/simulation/reproduction.rs:72
Methodavg_interpool_delta
Average score improvement for inter-pool breeding (last N deaths)
src/simulation/reproduction.rs:90
Methodavg_sexual_delta
Average score improvement for sexual reproduction (last N deaths)
src/simulation/reproduction.rs:81
Methodbuild
Builds a spatial index from the current ecosystem state. # Arguments `ecosystem` - The ecosystem to build indices for # Returns A spatial index or
src/simulation/spatial.rs:47
Methodclone_single_parent
Clones a single parent organism.
src/simulation/evolution.rs:514
Methodcrossover
Creates a new brain by averaging two parent brains. Both parents must be the same architecture type.
src/simulation/brain/mod.rs:122
Methodcrossover
Creates a new head by averaging two parent heads.
src/simulation/brain/transformer.rs:65
Methodcrossover
Creates a new layer by averaging two parent layers.
src/simulation/brain/mlp.rs:51
Methodcrossover_weighted
Creates a new brain by weighted averaging two parent brains. Both parents must be the same architecture type. weight1 is the weight for parent1, weigh
src/simulation/brain/mod.rs:165
Methodcrossover_weighted
Creates a new head by weighted averaging two parent heads.
src/simulation/brain/transformer.rs:74
Methodcrossover_weighted
Creates a new layer by weighted averaging two parent layers.
src/simulation/brain/mlp.rs:59
Methoddefault
()
src/simulation/events.rs:91
Methoddefault
()
src/simulation/reproduction.rs:20
Methoddefault
()
src/simulation/event_log.rs:42
Methoddefault
()
src/simulation/organism/scent.rs:30
Methoddefault
()
src/simulation/organism/perception.rs:96
Methoddefault
()
src/simulation/organism/vision.rs:28
Methoddefault
()
src/simulation/organism/proprioception.rs:31
Functiondefault_evolution_engine
()
src/simulation/ecosystem.rs:108
Functiondraw_pool_ages_plot
(ui: &mut egui::Ui, state: &UIState, params: &Params)
src/ui/stats.rs:340
Functiondraw_time_series_plot
( ui: &mut egui::Ui, id: &str, data: &VecDeque<(f64, f64)>, x_label: &str, y_label: &str,
src/ui/stats.rs:280
Functionexecute_asexual_reproduction
Executes asexual reproduction action. # Arguments `entity` - The organism reproducing `energy_contribution` - Amount of energy to give to offspring
src/simulation/actions.rs:292
Functionexecute_sexual_reproduction
Executes sexual reproduction action. # Arguments `entity` - The organism wanting to reproduce `energy_contribution` - Amount of energy this organism
src/simulation/actions.rs:322
Methodfood_tree
Get direct reference to the food KD-tree.
src/simulation/spatial.rs:113
Methodforward
(&self, input: &Array1<f32>)
src/simulation/brain/transformer.rs:33
Methodgenerate_disjoint_clusters
Generates disjoint cluster centers for organisms and food. Creates two sets of cluster centers that are guaranteed not to overlap by ensuring minimum
src/simulation/ecosystem.rs:156
Methodgraveyard
Returns a reference to the graveyard.
src/simulation/ecosystem.rs:985
Methodgraveyard
Returns a reference to the graveyard.
src/simulation/evolution.rs:531
Methodinput_size
(&self, params: &Params)
src/simulation/organism/vision.rs:218
Methodinput_size
(&self, params: &Params)
src/simulation/organism/proprioception.rs:93
Methodlayer_norm
(x: &Array1<f32>, gain: &Array1<f32>, bias: &Array1<f32>)
src/simulation/brain/transformer.rs:145
Methodload_from_file
Loads an ecosystem state from a JSON file. # Arguments `path` - Path to the JSON save file `params` - Simulation parameters (needed to reinitialize t
src/simulation/ecosystem.rs:796
Functionmain
()
src/main.rs:304
Methodmutate
Mutates all weights by adding random noise.
src/simulation/brain/transformer.rs:49
Methodmutate
Mutates weights and biases by adding random noise.
src/simulation/brain/mlp.rs:39
Methodname
(&self)
src/simulation/organism/vision.rs:223
Methodname
(&self)
src/simulation/organism/proprioception.rs:98
Methodnew
()
src/ui/ui.rs:36
Methodnew
Creates an empty event queue.
src/simulation/events.rs:98
Methodnew
Creates a new ecosystem with random organisms and food.
src/simulation/ecosystem.rs:285
Methodnew
Creates a new projectile. # Arguments `pos` - Starting position `rotation` - Firing direction in radians `speed` - Projectile speed `damage` - Damag
src/simulation/projectile.rs:45
Methodnew
Creates a new event log with specified capacity
src/simulation/event_log.rs:49
Methodnew
Creates a new evolution engine.
src/simulation/evolution.rs:41
Methodnew
Creates a new MLP brain with random weights.
src/simulation/brain/mod.rs:49
Methodnew
Creates a new scent sense.
src/simulation/organism/scent.rs:24
Methodnew
Creates a new perception system with the given senses. # Arguments `senses` - Vector of boxed sense implementations # Returns A new perception sys
src/simulation/organism/perception.rs:34
Methodnew
Creates a new vision sense.
src/simulation/organism/vision.rs:22
Methodnew
Creates a new proprioception sense.
src/simulation/organism/proprioception.rs:25
Methodnew_random
Creates a new food item at a random position. # Arguments `screen_center` - The center point of the simulation area, used to calculate bounds. `ener
src/simulation/food.rs:37
Methodnew_random
Creates a new attention head with random weights.
src/simulation/brain/transformer.rs:23
Methodnew_random
Creates a new layer with random weights and biases.
src/simulation/brain/mlp.rs:19
Methodnew_random
( id: usize, screen_center: &Array1<f32>, signal_size: usize, memory_size: usi
src/simulation/organism/organism.rs:124
Methodnew_transformer
Creates a new transformer brain with random weights. Parameters: - `input_size`: Size of input vector - `output_size`: Size of output vector - `model
src/simulation/brain/mod.rs:67
Methodorganisms_tree
Get direct references to the trees (for backwards compatibility).
src/simulation/spatial.rs:108
Functionperiodic_distance
Calculates the periodic distance between two DNA vectors. DNA space is [0, 1] x [0, 1] with periodic boundary conditions (toroidal topology). For eac
src/simulation/dna.rs:21
Methodpos
(&self)
src/simulation/projectile.rs:89
Methodpos
(&self)
src/simulation/organism/organism.rs:310
Methodpos_mut
(&mut self)
src/simulation/projectile.rs:93
Methodpos_mut
(&mut self)
src/simulation/organism/organism.rs:314
Methodprojectiles_tree
Get direct reference to the projectiles KD-tree.
src/simulation/spatial.rs:118
Methodquery_projectiles
Query projectiles within a radius.
src/simulation/spatial.rs:98
Methodrandom_cluster_position
Generates a random position within a random cluster
src/simulation/ecosystem.rs:213
Methodrandom_food_cluster_position
Returns a random position within a random food cluster. Regenerates clusters if they're empty (e.g., after loading from file).
src/simulation/ecosystem.rs:860
Methodrandom_pool_cluster_position
Generates a random position within a cluster belonging to a specific pool
src/simulation/ecosystem.rs:247
Methodrandom_spawn_position
Generates a random position using the same method as `Organism::new_random`.
src/simulation/ecosystem.rs:829
Methodrecord_death
Record a death and update statistics
src/simulation/reproduction.rs:32
Methodseed_from_other_pool
Seeds a new organism from a different genetic pool.
src/simulation/evolution.rs:291
Methodseed_from_other_pool_indexed
Seeds a new organism from a different genetic pool (indexed version).
src/simulation/evolution.rs:268
Methodsense
( &self, organism: &Organism, ecosystem: &Ecosystem, params: &Params,
src/simulation/organism/vision.rs:34
Methodsense
( &self, organism: &Organism, _ecosystem: &Ecosystem, params: &Params,
src/simulation/organism/proprioception.rs:37
Methodsenses
Returns a reference to the senses in this perception system.
src/simulation/organism/perception.rs:90
Methodsexual_reproduction
Performs sexual reproduction (crossover between two parents).
src/simulation/evolution.rs:313
Methodsexual_reproduction_indexed
Performs sexual reproduction (indexed version for living organisms).
src/simulation/evolution.rs:407
Methodspawn_from_graveyard
Helper method to spawn from graveyard using the old cloning approach.
src/simulation/evolution.rs:177
Methodspawn_from_pool_cloned
Spawns from a pool using the cloning approach (for small pools like graveyard).
src/simulation/evolution.rs:189
Functiontest_custom_perception
()
tests/perception_tests.rs:129
Functiontest_ecosystem_creation
()
tests/ecosystem_tests.rs:82
Functiontest_food_locatable
()
tests/locatable_tests.rs:6
Functiontest_food_spawning
()
tests/ecosystem_tests.rs:169
Functiontest_load_and_continue_simulation
()
tests/save_load_tests.rs:217
Functiontest_load_invalid_json
()
tests/save_load_tests.rs:160
Functiontest_load_nonexistent_file
()
tests/save_load_tests.rs:150
Functiontest_locatable_trait_polymorphism
()
tests/locatable_tests.rs:53
← previousnext →101–200 of 220, ranked by callers