Genetic Algorithms in Elixir: Suggest terminate?/1 true should mean terminate (p132)

Great book, Sean!
Can I suggest that the terminate? function should return true when it’s time to terminate, and false to continue?

1 Like

Thank you! I believe what you’re referring to is already the default behavior, but it’s very likely I made some mistakes when referencing terminate? throughout the book. Do you have any specific instances you can point me to?

1 Like

Excerpt From: Sean Moriarity. “Genetic Algorithms in Elixir.” Apple Books:
“The function terminate?/1 takes in a population and a returns a Boolean—true means continue evolving and false means stop and return. The question-mark at the end is common to Boolean functions in Elixir.”

Later on in the book, the function operates the way I think it should, so it’s just the above paragraph.

Henry

PS I find this forum difficult to navigate and use! Can I suggest you set up a free slack workspace to communicate with your readers? Thanks!

I was going to report this on page 67, and it could benefit from slight adjustment in language by saying “stop and return best chromosome”