Solving the One-Max Problem Again
Learn how our defined framework can solve the One-Max problem along with seeing a brief overview of what to expect in the next chapter.
We'll cover the following...
Applying our framework to the One-Max problem
With our framework built, it’s time to apply it to the One-Max problem. Firstly, open a terminal and create a new file in the scripts directory named one_max.exs
. This has already been done.
Next, open the one_max.exs
file. Now, think about what the framework already accomplishes and what parts of the problem need to be defined. What are the problem-specific parameters needed to pass into run
?
Once the parameters are determined, we’ll start defining them. Logically, the first one is how we encode chromosomes. Remember, for the One-Max problem, we’re looking for the maximum sum of a bitstring of ...
Access this course and 1400+ top-rated courses and projects.