Treating Chromosomes as Processes
Learn how to create an agent to treat chromosomes as processes.
We'll cover the following
Creating the Agent module
The strongest aspect of the BEAM is its ability to create and work with processes. We saw how easy it was to spin up new processes using the Task
module in the last lesson. In this lesson, we’ll use the Agent
module to accomplish parallelization in a different manner.
An Agent
is an abstraction around the state. Agents allow us to keep track of state between entities. In the original genetic algorithm framework, you perform transformations on Chromosome
structs. Using an Agent
, we can replace these transformations with interactions between processes. These processes will naturally run in parallel, and our algorithms will achieve parallelism naturally.
Create a free account to view this lesson.
By signing up, you agree to Educative's Terms of Service and Privacy Policy