2026-02-03 21:53:20 +01:00
2026-02-01 17:51:07 +01:00
2026-02-08 22:48:41 +01:00
2026-01-30 20:21:23 +01:00
2026-02-02 11:11:45 +01:00
2026-02-08 23:05:10 +01:00

it3708 - bio-inspired artificial intelligence

assignment 1

this project is written in odin and uiua (uiua-plot) with nix for dependency management.

with nix installed, just run

$ nix run

and it will run through the pipeline. it will generate data/image files in output/.

how to use

in src/common.odin there are multiple (hyper)parameters that can be set to influence how the genetic algorithm will run. here i will go through the available options to set.

parameter possible values note
PROBLEM_TYPE "knapsack", "feature_selection" part 1 or part 2 of the task
GENERATIONS int > 0 how many generations to simulate for
POPULATION_SIZE int > 0 how many individuals in population. remains constant.
ELITISM_COUNT unsigned int how many elites to bypass selection pipeline
SKEW unsigned int reproductive skew, influences how many parents and children compete for selection
TOURNAMENT_SIZE unsigned int how many to participate in tournament, if tournament selection is used
CROSSOVER_RATE [0, 1] chance of performing crossover
MUTATION_RATE [0, 1] chance of random mutation occuring
PARENT_SELECTION_POLICY random_selection, roulette_selection, tournament_selection what operator to use
CROSSOVER_POLICY single_point_crossover, two_point_crossover, uniform_crossover
MUTATION_POLICY bit_flip_mutation, swap_mutation, inversion_mutation
SURVIVOR_SELECTION_POLICY generational_replacement, deterministic_crowding, probabilistic_crowding
RANDOM_SEED unsigned int random seed if set to 0
OUTPUT_FILE string path where to store data. for simplicity, plot.ua expects output/data.csv as the output path.
Description
bio-inspired artificial intelligence
Readme 632 KiB
Languages
Odin 86.9%
Typst 6.9%
Nix 6.2%