Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/bones-ai/rust-snake-ai-ratatui
/ functions
Functions
81 in github.com/bones-ai/rust-snake-ai-ratatui
⨍
Functions
81
◇
Types & classes
15
↓ 7 callers
Method
fitness
(&self)
src/agent.rs:57
↓ 6 callers
Method
value
(&self)
src/utils.rs:47
↓ 4 callers
Method
draw_rect
(&self, painter: &mut Painter, point: Point, color: Color)
src/viz.rs:630
↓ 4 callers
Method
is_snake_body
(&self, pt: Point)
src/game.rs:69
↓ 4 callers
Method
is_wall
(&self, pt: Point)
src/game.rs:64
↓ 4 callers
Method
mutate
(&mut self, rate: f64, magnitude: f64)
src/nn.rs:89
↓ 4 callers
Method
score
(&self)
src/game.rs:59
↓ 2 callers
Method
get_bias
(&self, layer_idx: usize)
src/nn.rs:128
↓ 2 callers
Method
get_brain_input
(&self)
src/agent.rs:92
↓ 2 callers
Method
get_brain_output
(&self)
src/agent.rs:77
↓ 2 callers
Method
get_one_hot_dir
(&self)
src/utils.rs:57
↓ 2 callers
Method
partial_cmp
(&self, other: &Self)
src/agent.rs:175
↓ 1 callers
Method
draw
(&mut self)
src/sim.rs:51
↓ 1 callers
Method
draw
(&mut self)
src/viz.rs:114
↓ 1 callers
Method
draw_border
(&self, painter: &mut Painter)
src/viz.rs:642
↓ 1 callers
Method
draw_food
(&self, painter: &mut Painter)
src/viz.rs:669
↓ 1 callers
Method
draw_snake
(&self, painter: &mut Painter)
src/viz.rs:652
↓ 1 callers
Method
end_current_genration
(&mut self)
src/sim.rs:60
↓ 1 callers
Method
equals
(&self, other: Self)
src/utils.rs:74
↓ 1 callers
Method
generate_gene_pool
(&self)
src/pop.rs:181
↓ 1 callers
Function
get_eight_dirs
()
src/utils.rs:21
↓ 1 callers
Method
get_gen_summary
(&self)
src/pop.rs:64
↓ 1 callers
Method
get_snake_vision
(&self, dirs: Vec<(i32, i32)>)
src/agent.rs:101
↓ 1 callers
Method
get_step_limit
(&self)
src/agent.rs:140
↓ 1 callers
Method
get_tail_direction
(&self)
src/agent.rs:149
↓ 1 callers
Method
handle_food_collision
(&mut self)
src/game.rs:84
↓ 1 callers
Method
merge
(&self, other: &Net)
src/nn.rs:59
↓ 1 callers
Method
predict
(&self, inputs: Vec<f64>)
src/nn.rs:75
↓ 1 callers
Method
reset
(&mut self)
src/pop.rs:59
↓ 1 callers
Method
reset_pop
(&mut self)
src/pop.rs:83
↓ 1 callers
Method
save
(&self)
src/nn.rs:95
↓ 1 callers
Method
start_new_generation
(&mut self)
src/sim.rs:55
↓ 1 callers
Method
stop
(&self)
src/sim.rs:37
↓ 1 callers
Method
tournament_selection
(&self, tournament_size: usize)
src/pop.rs:167
↓ 1 callers
Method
update
(&mut self)
src/sim.rs:41
↓ 1 callers
Method
update_brain
(&mut self, new_brain: Net)
src/viz.rs:74
↓ 1 callers
Method
update_snake_positions
(&mut self)
src/game.rs:74
↓ 1 callers
Method
update_summary
(&mut self, stats: GenerationSummary, mr: f64, mg: f64)
src/viz.rs:78
↓ 1 callers
Method
vision_in_dir
(&self, st: Point, dir: (i32, i32))
src/agent.rs:114
Method
default
()
src/game.rs:19
Method
default
()
src/pop.rs:25
Method
default
()
src/viz.rs:683
Method
display_game_blocks
(game: &Game)
src/viz.rs:594
Method
eq
(&self, other: &Self)
src/agent.rs:169
Method
from
(val: (i32, i32))
src/utils.rs:90
Method
get_block_game_string
(game: &Game)
src/viz.rs:376
Method
get_mutation_params
(gen_max: f64)
src/pop.rs:202
Method
get_network_text
()
src/viz.rs:409
Method
get_node_colors
(agent: &Agent)
src/viz.rs:440
Method
get_rand_dir
()
src/utils.rs:36
Method
get_simple_render_text
(viz: &VizData)
src/viz.rs:338
Method
init_terminal
()
src/viz.rs:127
Method
load
()
src/nn.rs:119
Function
main
()
src/main.rs:9
Method
new
(x: i32, y: i32)
src/utils.rs:69
Method
new
(is_load: bool)
src/agent.rs:17
Method
new
()
src/game.rs:26
Method
new
()
src/sim.rs:27
Method
new
(layer_sizes: &[usize])
src/nn.rs:36
Method
new
()
src/pop.rs:32
Method
new
()
src/viz.rs:66
Method
rand
()
src/utils.rs:79
Method
render_about
()
src/viz.rs:261
Method
render_game_canvas
(game: &Game)
src/viz.rs:209
Method
render_gen_times_graph
(data: &[u64])
src/viz.rs:280
Method
render_max_score_gauge
(score: usize)
src/viz.rs:291
Method
render_nn
(agent: &Agent)
src/viz.rs:528
Method
render_score_graph
(data: &[u64])
src/viz.rs:276
Method
render_sim_stats
( stats: &GenerationSummary, sim_start_ts: &Instant, mutation_rate: f64, mutat
src/viz.rs:238
Method
render_viz_score_gauge
(score: usize)
src/viz.rs:284
Method
render_viz_stats
(agent: &Agent)
src/viz.rs:220
Method
restore_terminal
()
src/viz.rs:118
Method
update
(&mut self)
src/agent.rs:40
Method
update
(&mut self, dir: FourDirs)
src/game.rs:43
Method
update
(&mut self)
src/pop.rs:46
Method
update
(&mut self)
src/viz.rs:95
Method
widget_gauge
(ratio: f64, title: &str, color: Color)
src/viz.rs:322
Method
widget_raw_text
(message: String)
src/viz.rs:334
Method
widget_sparkline
(data: &'a [u64], title: &'a str, color: Color)
src/viz.rs:311
Method
widget_stats_block
(title: &str, items: Vec<String>)
src/viz.rs:298
Method
with_brain
(brain: Net)
src/agent.rs:33