quotegp

所属分类:人工智能/神经网络/深度学习
开发工具:Elixir
文件大小:10KB
下载次数:0
上传日期:2022-09-15 13:34:58
上 传 者sh-1993
说明:  使用Elixir AST的遗传编程
(Genetic programming using the Elixir AST)

文件列表:
.formatter.exs (97, 2022-09-15)
lib (0, 2022-09-15)
lib\quotegp.ex (25, 2022-09-15)
lib\quotegp (0, 2022-09-15)
lib\quotegp\cli.ex (452, 2022-09-15)
lib\quotegp\code.ex (942, 2022-09-15)
lib\quotegp\config.ex (547, 2022-09-15)
lib\quotegp\generation.ex (2586, 2022-09-15)
lib\quotegp\genetic_operators.ex (2091, 2022-09-15)
lib\quotegp\population.ex (3218, 2022-09-15)
mix.exs (630, 2022-09-15)
mix.lock (2167, 2022-09-15)
samples (0, 2022-09-15)
samples\sample1.json (434, 2022-09-15)
samples\sample2.json (529, 2022-09-15)
samples\sample3.json (660, 2022-09-15)
test (0, 2022-09-15)
test\quotegp_test.exs (2825, 2022-09-15)
test\test_helper.exs (15, 2022-09-15)

# QuoteGP - genetic programming with native Elixir code A genetic programming system that uses Elixir AST as a program representation and can evolve native Elixir language solutions to problems. This is currently at a proof-of-concept level of maturity. ## Getting Started & Samples There are a couple of simple sample problems included in this repo, in the `samples` subdirectory. The problems here are "symbolic regression" curve fitting problems, in which the GP system attempts to evolve code which maps a series of numerical inputs to the provided outputs. These samples are "toy" problems - they are intended to be solvable but slightly challenging in order to test the GP system and demonstrate how it works. To run via the command-line, you can use the included escript: ``` mix escript.build ./quotegp ./samples/sample1.json ``` To run via code: ``` # Generate some test data: test_cases = 8..16 |> Enum.map(fn x -> {x, x * x + 3 * x + 8} end) # Configure and run: config = %QuoteGP.Config{} QuoteGP.Population.build(config) |> QuoteGP.Population.run(test_cases) ``` For more advanced usage, configure a GP run with the following options (shown with defaults): ``` %QuoteGP.Config{ population_size: 1000, max_generations: 100, max_program_depth: 10, mutation_probability: 0.1, halt_fitness: 0.0, mutation_rate: 0.3, crossover_rate: 0.3, tournament_size: 9 } ``` - halt_fitness: a fitness at which execution will halt - max_generations: the maximum number of generations to run if a solution is not found - population_size: the number of individuals in the evolving population - max_program_depth: the maximum depth of a program in the population - mutation_probability: 0.1, - mutation_rate: 0.3, - crossover_rate: 0.3, - tournament_size: the number of individuals in a "tournament" selection event ## Other Classes of Problems

近期下载者

相关文件


收藏者