Genetic Algorithms in Elixir: Some feedback, a question and suggestion
@seanmor5 - This is a great book so far… I’m enjoying reading and coding along with it!
Quick question, though - since “evaluate” goes to the trouble of calling the “fitness_function” and generating an updated list of Chromosomes with the new calculated “fitness” values in the struct, instead of ending the function with this (where it has to call the “fitness_function” a bunch more times):
|> Enum.sort_by(fitness_function, &>=/2)
why not end it with this (in order to use these pre-calculated values)?
|> Enum.sort_by(& &1.fitness, &>=/2)
Also, I’m kinda sad that you dismissed the tree-type genetic programming like John Koza did in the 60s and 70s (to generate electronic circuits and a whole bunch of other cool stuff), but that is a huge topic in itself. Also, I’m extremely interested in Gene Expression Programming invented by Dr. Candida Ferreira, but that is also tree-type.
Anyway, thanks for the great book, and I look forward to your updates!
– Glenn
Popular Pragprog topics










Other popular topics










Latest in Pragprog
Latest (all)
Categories:
My Saved Portals
-
None saved yet
Popular Portals
- /elixir
- /opensuse
- /rust
- /kotlin
- /ruby
- /erlang
- /python
- /clojure
- /react
- /quarkus
- /go
- /vapor
- /v
- /react-native
- /wasm
- /security
- /django
- /nodejs
- /centos
- /haskell
- /rails
- /fable
- /gleam
- /swift
- /js
- /deno
- /assemblyscript
- /tailwind
- /laravel
- /symfony
- /phoenix
- /crystal
- /typescript
- /debian
- /adonisjs
- /julia
- /arch-linux
- /svelte
- /spring
- /preact
- /flutter
- /c-plus-plus
- /actix
- /java
- /angular
- /ocaml
- /zig
- /kubuntu
- /scala
- /zotonic
- /vim
- /rocky
- /lisp
- /html
- /keyboards
- /vuejs
- /nim
- /emacs
- /nerves
- /elm