Reader small image

You're reading from  Hands-On Neuroevolution with Python.

Product typeBook
Published inDec 2019
Reading LevelExpert
PublisherPackt
ISBN-139781838824914
Edition1st Edition
Languages
Right arrow
Author (1)
Iaroslav Omelianenko
Iaroslav Omelianenko
author image
Iaroslav Omelianenko

Iaroslav Omelianenko occupied the position of CTO and research director for more than a decade. He is an active member of the research community and has published several research papers at arXiv, ResearchGate, Preprints, and more. He started working with applied machine learning by developing autonomous agents for mobile games more than a decade ago. For the last 5 years, he has actively participated in research related to applying deep machine learning methods for authentication, personal traits recognition, cooperative robotics, synthetic intelligence, and more. He is an active software developer and creates open source neuroevolution algorithm implementations in the Go language.
Read more about Iaroslav Omelianenko

Right arrow

Python Libraries and Environment Setup

This chapter introduces the Python libraries that we can use in order to implement the neuroevolution algorithms we described in the previous chapter. We will also discuss the strengths and weaknesses of each library that's presented. In addition to this, we will provide basic usage examples. Then, we will consider how to set up the environment for the experiments that we will perform later in this book and examine common ways to do this in the Python ecosystem. Finally, we will demonstrate how to set up a working environment using Anaconda Distribution, which is a popular tool for managing Python dependencies and virtual environments among data scientists. In this chapter, you will learn how to start using Python to experiment with the neuroevolution algorithms that will be covered in this book.

In this chapter, we will cover the following...

Suitable Python libraries for neuroevolution experiments

The Python programming language is one of the most popular languages for activities related to machine learning and research and development in the field of artificial intelligence. The most prominent frameworks are either written in Python or provide corresponding interfaces. Such popularity can be explained by Python's short learning curve and its nature as a scriptable language, which allows experiments to take place quickly. Thus, following a general trend in the machine learning community, several libraries were written in Python with the support for neuroevolution, and the number of libraries continues to grow over time. In this section, we will look at the most stable Python libraries for experiments in the field of evolutionary algorithms.

...

Environment setup

When working with Python libraries, it is essential to set up a working environment properly. There are a lot of dependencies, including the Python language version and the binaries that are available in the system; all of these must be aligned and have compatible versions. As a result of this process, the conflicting configurations of libraries and language versions can be easily created, adding to the frustration and hours of debugging and bug fixes. To solve this problem, the concept of the virtual environment was introduced in the Python programming language. A virtual environment allows us to create isolated Python environments that contain all the necessary dependencies and executables that are used in a particular Python project. Such a virtual environment can be easily created and deleted after it is no longer needed, without leaving any remains in the...

Summary

In this chapter, we learned about four popular Python libraries that we can use for experiments in the field of neuroevolution. We discussed the strengths and weaknesses of each library that was presented, and reviewed the basic examples of using these libraries in Python. After that, we looked at how to set up the environment for Python-based experiments to avoid the side effects of having multiple versions of the same library in the Python path. We found that the best way to do this is to create isolated virtual environments for each Python project, and considered several popular solutions created by the open source community to help with this task. Finally, we introduced Anaconda Distribution, which includes, among other useful things, the package manager and an environment manager. For the rest of this book, we will use Anaconda to handle setting up the environment...

lock icon
The rest of the chapter is locked
You have been reading a chapter from
Hands-On Neuroevolution with Python.
Published in: Dec 2019Publisher: PacktISBN-13: 9781838824914
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
undefined
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime

Author (1)

author image
Iaroslav Omelianenko

Iaroslav Omelianenko occupied the position of CTO and research director for more than a decade. He is an active member of the research community and has published several research papers at arXiv, ResearchGate, Preprints, and more. He started working with applied machine learning by developing autonomous agents for mobile games more than a decade ago. For the last 5 years, he has actively participated in research related to applying deep machine learning methods for authentication, personal traits recognition, cooperative robotics, synthetic intelligence, and more. He is an active software developer and creates open source neuroevolution algorithm implementations in the Go language.
Read more about Iaroslav Omelianenko