Muutke küpsiste eelistusi

Genetic Algorithms in Elixir [Pehme köide]

  • Formaat: Paperback / softback, 230 pages, kõrgus x laius x paksus: 235x190x14 mm, kaal: 450 g
  • Ilmumisaeg: 08-Apr-2021
  • Kirjastus: The Pragmatic Programmers
  • ISBN-10: 168050794X
  • ISBN-13: 9781680507942
  • Formaat: Paperback / softback, 230 pages, kõrgus x laius x paksus: 235x190x14 mm, kaal: 450 g
  • Ilmumisaeg: 08-Apr-2021
  • Kirjastus: The Pragmatic Programmers
  • ISBN-10: 168050794X
  • ISBN-13: 9781680507942
From finance to artificial intelligence, genetic algorithms are a powerful tool with a wide array of applications. But you don't need an exotic new language or framework to get started; you can learn about genetic algorithms in a language you're already familiar with. Join us for an in-depth look at the algorithms, techniques, and methods that go into writing a genetic algorithm. From introductory problems to real-world applications, you'll learn the underlying principles of problem solving using genetic algorithms.



Evolutionary algorithms are a unique and often overlooked subset of machine learning and artificial intelligence. Because of this, most of the available resources are outdated or too academic in nature, and none of them are made with Elixir programmers in mind.



Start from the ground up with genetic algorithms in a language you are familiar with. Discover the power of genetic algorithms through simple solutions to challenging problems. Use Elixir features to write genetic algorithms that are concise and idiomatic. Learn the complete life cycle of solving a problem using genetic algorithms. Understand the different techniques and fine-tuning required to solve a wide array of problems. Plan, test, analyze, and visualize your genetic algorithms with real-world applications.



Open your eyes to a unique and powerful field - without having to learn a new language or framework.



What You Need:



You'll need a macOS, Windows, or Linux distribution with an up-to-date Elixir installation.
Disclaimer ix
Acknowledgments xi
Preface xiii
1 Writing Your First Genetic Algorithm
1(14)
Understanding Genetic Algorithms
2(3)
Introducing the One-Max Problem
5(1)
Initializing the Population
6(1)
Understanding the Flow of Genetic Algorithms
7(2)
Selecting Parents
9(1)
Creating Children
10(1)
Running Your Solution
11(2)
Adding Mutation
13(1)
What You Learned
14(1)
2 Breaking Down Genetic Algorithms
15(18)
Reviewing Genetic Algorithms
15(1)
Looking Deeper into Genetic Algorithms
16(6)
Using Mix to Write Genetic Algorithms
22(1)
Building a Framework for Genetic Algorithms
23(4)
Understanding Hyperparameters
27(2)
Solving the One-Max Problem Again
29(2)
What You Learned
31(2)
3 Encoding Problems and Solutions
33(18)
Using Structs to Represent Chromosomes
33(4)
Using Behaviours to Model Problems
37(6)
Understanding and Choosing Genotypes
43(3)
Solving One-Max for the Last Time
46(1)
Spelling Words with Genetic Algorithms
47(3)
What You Learned
50(1)
4 Evaluating Solutions and Populations
51(20)
Optimizing Cargo Loads
52(3)
Introducing Penalty Functions
55(1)
Applying a Penalty to the Shipping Problem
56(1)
Defining Termination Criteria
57(4)
Applying Termination Criteria to Shipping
61(1)
Crafting Fitness Functions
62(3)
Exploring Different Types of Optimization
65(4)
What You Learned
69(2)
5 Selecting the Best
71(16)
Exploring Selection
72(3)
Customizing Selection in Your Framework
75(3)
Implementing Common Selection Strategies
78(7)
What You Learned
85(2)
6 Generating New Solutions
87(20)
Introducing N-Queens
87(4)
Solving N-Queens with Order-One Crossover
91(4)
Exploring Crossover
95(1)
Implementing Other Common Crossover Strategies
95(7)
Crossing Over More Than Two Parents
102(1)
Implementing Chromosome Repairment
103(2)
What You Learned
105(2)
7 Preventing Premature Convergence
107(18)
Breaking Codes with Genetic Algorithms
108(5)
Understanding Mutation
113(2)
Customizing Mutation in Your Framework
115(2)
Implementing Common Mutation Strategies
117(5)
Other Methods to Combat Convergence
122(1)
What You Learned
123(2)
8 Replacing and Transitioning
125(14)
Creating a Class Schedule
126(3)
Understanding Reinsertion
129(4)
Experimenting with Reinsertion
133(2)
Growing and Shrinking Populations
135(1)
Local Versus Global Reinsertion
136(1)
What You Learned
137(2)
9 Tracking Genetic Algorithms
139(18)
Using Genetic Algorithms to Simulate Evolution
139(5)
Logging Statistics Using ETS
144(6)
Tracking Genealogy in a Genealogy Tree
150(5)
What You Learned
155(2)
10 Visualizing the Results
157(12)
Visualizing the Genealogy of the Tiger Evolution
157(3)
Visualizing Basic Statistics
160(2)
Playing Tetris with Genetic Algorithms
162(1)
Installing and Compiling ALEx
163(5)
What You Learned
168(1)
11 Optimizing Your Algorithms
169(18)
Benchmarking and Profiling Genetic Algorithms
170(5)
Writing Fast Elixir
175(2)
Improving Performance with Parallellzation
177(6)
Improving Performance with NIFs
183(2)
What You Learned
185(2)
12 Writing Tests and Code Quality
187(12)
Understanding Randomness
188(1)
Writing Property Tests with ExUnit
189(3)
Cleaning Up Your Framework
192(3)
Writing Type Specifications
195(3)
What You Learned
198(1)
13 Moving Forward
199(6)
Learning with Evolution
199(1)
Designing with Evolution
200(1)
Trading with Evolution
201(1)
Networking with Evolution
202(1)
Evolving Neural Networks
203(1)
Where to Go Next
204(1)
Bibliography 205(2)
Index 207
Sean Moriarity graduated from the United States Military Academy with a degree in Computer Science. Sean was first introduced to genetic algorithms while on a summer internship which inspired him to write *Genex*, a library for writing evolutionary algorithms in Elixir. Many of the problems and solutions you'll encounter in this book were inspired from the lessons learned while developing *Genex*. Sean's passions include functional programming, artificial intelligence, mathematics, and, of course, evolutionary algorithms.