9
Evo-RL: Evolutionary-Driven Reinforcement Learning Ahmed Hallawa 12 Thorsten Born 3 Anke Schmeink 3 Guido Dartmann 4 Arne Peine 2 Lukas Martin 2 Giovanni Iacca 5 A.E. Eiben 6 Gerd Ascheid 1 Abstract In this work, we propose a novel approach for re- inforcement learning driven by evolutionary com- putation. Our algorithm, dubbed as Evolutionary- Driven Reinforcement Learning (Evo-RL), em- beds the reinforcement learning algorithm in an evolutionary cycle, where we distinctly differen- tiate between purely evolvable (instinctive) be- haviour versus purely learnable behaviour. Fur- thermore, we propose that this distinction is de- cided by the evolutionary process, thus allowing Evo-RL to be adaptive to different environments. In addition, Evo-RL facilitates learning on envi- ronments with rewardless states, which makes it more suited for real-world problems with incom- plete information. To show that Evo-RL leads to state-of-the-art performance, we present the per- formance of different state-of-the-art reinforce- ment learning algorithms when operating within Evo-RL and compare it with the case when these same algorithms are executed independently. Re- sults show that reinforcement learning algorithms embedded within our Evo-RL approach signif- icantly outperform the stand-alone versions of the same RL algorithms on OpenAI Gym control problems with rewardless states constrained by the same computational budget. 1. Introduction In reinforcement learning (RL), the reward function plays a pivotal role in the performance of the algorithm. However, the reward function definition is challenging especially in 1 Chair for Integrated Signal Processing Systems, RWTH Aachen University 2 Department of Intensive Care and Intermediate Care, University Hospital RWTH Aachen 3 Research Area Informa- tion Theory and Systematic Design of Communication Systems, RWTH Aachen University 4 Research Area Distributed Systems, Trier University of Applied Sciences 5 Department of Information Engineering and Computer Science, University of Trento 6 Com- puter Science Department Vrije Universiteit Amsterdam. Corre- spondence to: Ahmed Hallawa <[email protected]>. real world problems. This is because in many problems the designer has incomplete information regarding the problem and therefore, defining a reward function that takes into consideration all possible states is hard. For example, in (Komorowski et al., 2018), the authors attempted to use reinforcement learning to find the best volume therapy for patients in intensive care units. As the model targets op- timizing patient mortality, the authors defined the reward based on how probabilistically, according to the patients data, a given state is close to one of two terminal states: the state of survival (positive reward) or the state of death (negative reward). Although this is a valid reward function for states close to those terminal states, it is not accurate for states that are far from both terminal states. Generally, it is hard for clinicians to quantify a reward that is valid for all possible patient states, especially if the state vector includes tens of variables. This is also valid other fields such as robotics. The question then is: Is it possible to solve a reinforcement learning problem with a reward function that is only known and valid for a few states? Meta-heuristic algorithms such as Evolutionary Algorithms (EAs) can offer a solution to this problem. EAs is an umbrella term used to describe computer-based problem- solving systems that adopt computational models where the evolutionary processes are the main element in their de- sign (Fister et al., 2015). These algorithms are particularly good as black-box optimizers, i.e., to solve problems whose mathematical formalization is hard to produce. However, these algorithms treat the problem of finding an optimal pol- icy of an agent interacting with a certain environment as a black-box problem, thus, not gaining any information from potential feedback signals available in the environment. In this work, we propose a hybrid approach combining EAs and RL. Most importantly, our approach handles problems where the reward function is not available in many of the state in the state space. Of note, many previous works tried to use EA combined with RL, such as in (Kim et al., 2007), (H¨ am¨ al ¨ ainen et al., 2018) and (Koulouriotis and Xanthopoulos, 2008). However, they target optimizing the RL process itself via the EA, rather than evolving an agent behaviour and embedding the learning process within it. Our algorithm combines evolutionary computation and RL arXiv:2007.04725v2 [cs.LG] 10 Jul 2020

Evo-RL: Evolutionary-Driven Reinforcement LearningEvo-RL: Evolutionary-Driven Reinforcement Learning Ahmed Hallawa1 2 Thorsten Born 3Anke Schmeink Guido Dartmann4 Arne Peine2 Lukas

  • Upload
    others

  • View
    8

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Evo-RL: Evolutionary-Driven Reinforcement LearningEvo-RL: Evolutionary-Driven Reinforcement Learning Ahmed Hallawa1 2 Thorsten Born 3Anke Schmeink Guido Dartmann4 Arne Peine2 Lukas

Evo-RL: Evolutionary-Driven Reinforcement Learning

Ahmed Hallawa 1 2 Thorsten Born 3 Anke Schmeink 3 Guido Dartmann 4 Arne Peine 2 Lukas Martin 2

Giovanni Iacca 5 A.E. Eiben 6 Gerd Ascheid 1

Abstract

In this work, we propose a novel approach for re-inforcement learning driven by evolutionary com-putation. Our algorithm, dubbed as Evolutionary-Driven Reinforcement Learning (Evo-RL), em-beds the reinforcement learning algorithm in anevolutionary cycle, where we distinctly differen-tiate between purely evolvable (instinctive) be-haviour versus purely learnable behaviour. Fur-thermore, we propose that this distinction is de-cided by the evolutionary process, thus allowingEvo-RL to be adaptive to different environments.In addition, Evo-RL facilitates learning on envi-ronments with rewardless states, which makes itmore suited for real-world problems with incom-plete information. To show that Evo-RL leads tostate-of-the-art performance, we present the per-formance of different state-of-the-art reinforce-ment learning algorithms when operating withinEvo-RL and compare it with the case when thesesame algorithms are executed independently. Re-sults show that reinforcement learning algorithmsembedded within our Evo-RL approach signif-icantly outperform the stand-alone versions ofthe same RL algorithms on OpenAI Gym controlproblems with rewardless states constrained bythe same computational budget.

1. IntroductionIn reinforcement learning (RL), the reward function plays apivotal role in the performance of the algorithm. However,the reward function definition is challenging especially in

1Chair for Integrated Signal Processing Systems, RWTHAachen University 2Department of Intensive Care and IntermediateCare, University Hospital RWTH Aachen 3Research Area Informa-tion Theory and Systematic Design of Communication Systems,RWTH Aachen University 4Research Area Distributed Systems,Trier University of Applied Sciences 5Department of InformationEngineering and Computer Science, University of Trento 6 Com-puter Science Department Vrije Universiteit Amsterdam. Corre-spondence to: Ahmed Hallawa <[email protected]>.

real world problems. This is because in many problems thedesigner has incomplete information regarding the problemand therefore, defining a reward function that takes intoconsideration all possible states is hard. For example, in(Komorowski et al., 2018), the authors attempted to usereinforcement learning to find the best volume therapy forpatients in intensive care units. As the model targets op-timizing patient mortality, the authors defined the rewardbased on how probabilistically, according to the patientsdata, a given state is close to one of two terminal states:the state of survival (positive reward) or the state of death(negative reward). Although this is a valid reward functionfor states close to those terminal states, it is not accuratefor states that are far from both terminal states. Generally,it is hard for clinicians to quantify a reward that is validfor all possible patient states, especially if the state vectorincludes tens of variables. This is also valid other fieldssuch as robotics. The question then is: Is it possible to solvea reinforcement learning problem with a reward functionthat is only known and valid for a few states?

Meta-heuristic algorithms such as Evolutionary Algorithms(EAs) can offer a solution to this problem. EAs is anumbrella term used to describe computer-based problem-solving systems that adopt computational models wherethe evolutionary processes are the main element in their de-sign (Fister et al., 2015). These algorithms are particularlygood as black-box optimizers, i.e., to solve problems whosemathematical formalization is hard to produce. However,these algorithms treat the problem of finding an optimal pol-icy of an agent interacting with a certain environment as ablack-box problem, thus, not gaining any information frompotential feedback signals available in the environment.

In this work, we propose a hybrid approach combining EAsand RL. Most importantly, our approach handles problemswhere the reward function is not available in many of thestate in the state space. Of note, many previous workstried to use EA combined with RL, such as in (Kim et al.,2007), (Hamalainen et al., 2018) and (Koulouriotis andXanthopoulos, 2008). However, they target optimizing theRL process itself via the EA, rather than evolving an agentbehaviour and embedding the learning process within it.

Our algorithm combines evolutionary computation and RL

arX

iv:2

007.

0472

5v2

[cs

.LG

] 1

0 Ju

l 202

0

Page 2: Evo-RL: Evolutionary-Driven Reinforcement LearningEvo-RL: Evolutionary-Driven Reinforcement Learning Ahmed Hallawa1 2 Thorsten Born 3Anke Schmeink Guido Dartmann4 Arne Peine2 Lukas

Evolutionary-Driven Reinforcement Learning

in a single framework, where the line between which be-haviour is evolvable and which one is learnable is auto-matically generated based on the environment properties,thus, making this approach highly adaptive. In other words,our approach does not require, at the design time, definingwhich part of the agent behaviour (policy) should rely onEA and which one is learned via RL, as this is also chal-lenging in real world problems. Generally, our approach:(1) consists of an EA loop embedding RL; (2) can handlecomplex environments where the reward function is validonly for a limited number of states; (3) at design time, itdoes not require defining which part of the behaviour shouldbe evolved and which part should be learned; (4) is agnosticwith respect to the behaviour representation, and works withany reinforcement learning algorithm.

Our primary contribution is the design and implementationof an evolutionary-driven reinforcement learning algorithm.We demonstrate the algorithm on three different OpenAIgym control problems (CartPole, Acrobot and Mountain-Car), after transforming them into environments with re-wardless states. Our evaluations show that our approachcompares favorably against stand-alone RL algorithms suchas Q-learning, Proximal Policy Optimization (PPO) (Schul-man et al., 2017) and Deep Q-Network (Mnih et al., 2015)(DQN).

2. Proposed ModelWe aim at handling problems with ambiguous environmentswhere the reward function definition is hard for a wide rangeof states, thus, the environment presents states where thereward function is not applicable. In this section, we definethe main terminology needed to explain our approach, thenpresent the general form of our algorithm, including itsdesign axioms.

2.1. Terminology

In the proposed work, we identify two types of behaviors:a purely evolved behavior, and a learnable behavior, whichis driven by the agent’s experience in its lifetime. The firstone is dubbed as instinctive behavior. We formally definean instinctive behaviour as the evolved part of the agent’sbehaviour that is inherited from its ancestors and cannot bechanged during the learning process within the lifetime ofthe agent.

As for the second behavior, the learned behavior, we pictureit as an extension to the evolved instinctive behavior. Wedefine a learnable behaviour as the behaviour learned bythe agent during its lifetime, as a result of its exposure to theenvironment. It should be noted that the learned behaviourcannot alter the instinctive behaviour. Finally, we definethe overall behaviour as the combination of the agent’s

Conception Phase:- Reproduction

- Instinctive behavior evolved

Infancy Phase:- Exposure to environment- Learned behavior via RL

Born Mature

Maturity Phase:- Evaluation of the overall

behavior (instinctive + learned)

Fertile

1- Agent is born with an instinctive behavior

inherited from its ancestors

2- Agent has learned new behavior after exposure to the environment without changing

its instinctive behavior

4- A selection process is applied on the population to facilitate reproduction in the conception phase

3- Agent overall behavior has been

evaluated

Environment Environment

Figure 1. The Evo-RL scheme showing the agent life-cycle, high-lighting its different phases and states (born, mature and fertile).

instinctive and learned behaviour, integrated together duringthe agent’s lifetime.

Furthermore, inspired by (Eiben et al., 2013), we identifythree states for the agent: the born state, which means thatan agent has already an instinctive behaviour, but no learnedbehaviour. Note that the agent in this state is not exposed tothe environment yet. The second state, dubbed as mature,means that the agent is already trained on the environmentand has now an instinctive and a learned behaviour. Finally,the fertile state, means that the agent overall behaviour is al-ready evaluated, therefore, a score reflecting its performancerelative to a pre-defined objective can be computed.

2.2. Our Approach

The outer loop of Evo-RL is an evolutionary algorithm.Similar to any EA, Evo-RL starts by initializing a set ofindividuals (agents), thus, producing a population of agents.In the first iteration, each agent has a randomly initializedbehaviour. This behaviour has a dual representation, oneobservable phenotype and its corresponding genotype. Thegenotype encodes the phenotype and contains all the in-formation necessary to build the phenotype. For example,the phenotype can be an Artificial Neural Network (ANN)representing the agent behaviour, while the genotype canbe a set of binary numbers that when decoded produce theANN of that agent’s behaviour. The genotype is necessaryfor reproducing newly born agents in a later stage.

After this initialization, each agent in the population is con-sidered in the born state, and has an instinctive behaviour.As shown in Figure 1, after birth, the agent starts to beexposed to the environment. In this infancy phase, rein-forcement learning is executed. However, the agent cannotoverwrite its instinctive behaviour, thus, if the agent is ina state where the instinctive behaviour has already definedan action to execute, the agent executes this action and nolearning is done with respect to this state. On the other hand,if the agent is in a state where the instinctive behaviourdoes not define what should be done, then the agent pro-

Page 3: Evo-RL: Evolutionary-Driven Reinforcement LearningEvo-RL: Evolutionary-Driven Reinforcement Learning Ahmed Hallawa1 2 Thorsten Born 3Anke Schmeink Guido Dartmann4 Arne Peine2 Lukas

Evolutionary-Driven Reinforcement Learning

ceeds with its learning algorithm normally. After the infancyphase ends, due to resource or time constraints for example,the agent reaches the mature stage and is now ready to beevaluated. In the maturity phase, the agent overall behaviouris evaluated with respect to pre-set objectives. A score thatmeasures its performance is then calculated.

Based on this score, a selection process of parents is con-ducted, taking into consideration all agents in the population.This selection process must ensure diversity to avoid gettingstuck on local maxima. Based on selection procedure, wereach now the conception phase, where different reproduc-tion operators are executed on the genotype, for instance bycombining instinctive behaviour genes from different par-ents. Furthermore, to allow plasticity of learned behaviour,in the conception phase, parents also exchange their learnedbehaviour. For example, if the learned behaviour is an artifi-cial neural network (ANN), then the weights of the networkof the parents is averaged, thus, allowing the next generationto gain from past learned experiences of their parents. How-ever, this process does not intervene with the evolutionaryprocess, as the exchange of genes is done only on the in-stinctive behaviour. Furthermore, the instinctive behaviouroverwrites any learned behaviour. Hence, if the instinctivebehaviour choose to handle a particular state, no learning isdone on that state.

Finally, after conception, a set of newly born agents withevolved instinctive behaviours are now ready for a new cyclewhere they are exposed to the environment. All these stepscan be repeated until a stopping criterion is reached, suchas exhausting a pre-defined computational budget.

To summarize, the overall approach is an evolutionary com-putation approach. However, the novelty can be highlightedin the following design axioms:

1. The choice of which part of the overall behaviour isinstinctive, and which is not, is decided by the evolu-tionary process. In other words, the line between whatis instinctive (fully evolvable) and learnable, is evolved.This is achieved by not allowing the learning process tooverwrite the instinctive behaviour. Evolution dictateswhich region of states it operates on.

2. The overall fitness of an agent considers both behaviors,i.e., instinctive plus learnable. This is facilitated byconducting the evaluation of the behaviour after thelearning process is conducted.

3. In the conception phase, only the instinctive behaviouris evolved, but the learned behaviour is transferredto the off-springs to allow plasticity in the learnedbehaviour as long as the instinctive behaviour allows it.In case of conflict, the instinctive behaviour overwritesany learnable behaviour.

3. Related WorkGenerally, we propose an algorithm that encapsulates rein-forcement learning within an evolutionary algorithm cycle.The importance of combining evolutionary computationwith learning in general was highlighted in (Hinton andNowlan, 1987). In this paper, authors argued that adopt-ing a genetic algorithm combined with a local and myopicoptimizer such as hillclimbing will lead to a better searchalgorithm than either of these algorithms alone.

In recent years, researchers proposed different approachesto combine evolutionary computation with reinforcementlearning. Notably, one approach is realized by combin-ing deep neuroevolution and deep reinforcement learning(Pourchot and Sigaud, 2018). In this work, authors use asimple cross-entropy method (CEM) in combination of anoff-policy deep reinforcement learning.

In (Bodnar et al., 2019), authors propose a novel algo-rithm called Proximal Distilled Evolutionary ReinforcementLearning (PDERL). In their approach, they adopt a hierar-chical integration between evolution and learning.

Furthermore, authors in (Khadka et al., 2019) combined EAand RL by introducing a Collaborative Evolutionary Rein-forcement Learning (CERL) algorithm. In CERL, differentlearners with different time horizons explore the solutionspace while committing to the task they are solving.

4. Evo-RL ImplementationThe approach presented in the previous section can be im-plemented in various ways. For example, we do not dictatea particular way for representing the instinctive behaviour orthe learnable behaviour. Furthermore, this approach workswith any reinforcement learning algorithm; likewise, anyevolutionary algorithm can be adopted.

However, for evaluation purposes, we have implemented thealgorithm as follows. Firstly, we used the EA in the form ofGenetic Programming (GP). However, as for what concernsthe representation of the instinctive (evolved) behaviour,we adopted behaviour trees (BTs). These fit well withGP and, unlike ANN, are much easier to interpret. As forthe learned behaviour, we adopted two possibilities, onetabular representation used when testing our approach withQ-learning, and another ANN representation when testingour approach with Proximal Policy Optimization (PPO) andDeep Q-Network (DQN) algorithm. Figure 2 shows anexample of the overall behaviour of an agent.

4.1. Behavior Trees

A BT is a formal, graphical modelling language that wasintroduced in the gaming industry in order to simplify theprogramming of bots. The behavior of these bots is de-

Page 4: Evo-RL: Evolutionary-Driven Reinforcement LearningEvo-RL: Evolutionary-Driven Reinforcement Learning Ahmed Hallawa1 2 Thorsten Born 3Anke Schmeink Guido Dartmann4 Arne Peine2 Lukas

Evolutionary-Driven Reinforcement Learning

?

→ → →

c1 a1 inv a2

c2

c3 a3

sel<seq<c1,a1>,seq<inv<c2>,a2>,seq<c3,a3>>

⇐ ⇒0

0

1

2

...

255

0.78 -0.34 0.0

0.49

0.63

0.03

0.0

-0.12

0.0

0.970.34-0.72

⇐ 0 ⇒

0

position

speed

Behavior Tree

Q-table

Neural Net

RL Agent

Figure 2. Example representation of an agent behaviour. Left: In-stinctive behaviour in the form of BT. Right: Two possible learnedbehaviour representations, a tabular form and an ANN. Note thatthis is a simplified version of an ANN.

scribed in the form of a graph that represents a tree thatcontrols the flow of decision making. This tree is a depth-first acyclic directed graph. The top most node is calledthe root node, which is the only node that does not have aparent.

During execution, the BT gets ticked starting at the rootnode every time. It then traverses the tree in a depth-firstorder, ticking each node. Depending on the signal generatedby the children of the currently ticked node, a certain signalis generated that determines the next node to tick. Executingthe BT again will tick all the nodes again, i.e. there is nomemory in between different ticks. A signal can take onethe following values:

• Success: Informs the parent that the command was asuccess.

• Failure: Informs the parent that the command was afailure.

• Running: Informs the parent that the command is stillrunning.

The nodes of a BT can either be leaf nodes or compositenodes.

Composite nodes can have one or more children and areparents to other composite nodes or to a leaf node. Theycan be any of the following types: Selector, Sequence, Dec-orator, or Parallel. A selector node visits all of its childrenin order, from left to right. If any of its children returns thestatus Success, Success is sent upwards in the tree. If allchildren were ticked and none of them returned Success, thesignal Failure is set upwards in the tree. This node is alsosometimes called a fallback node. It is represented as anoval with a question mark (Figure 3a). A sequence nodevisits all of its children in order, from left to right. If and

only if all children return the status Success, Success is alsopropagated upwards in the tree. If any child returns Failure,the status Failure is immediately sent upwards in the tree. Itis represented as an oval with a right pointing arrow (Fig-ure 3b). The decorator nodes only have one child and theirpurpose is to modify the signal based on its type (Figure 3c).For example, an invert node, negates the signal generatedby its child. Thus Success will become Failure, and viceversa. A Repeater repeats ticking its child x times. RepeatUntil Fail ticks its child in a loop until it returns Failure.On the other hand, in parallel nodes, all of its children getticked at the same time (Figure 3d). This allows multiplechildren to enter the running state. The signal that gets prop-agated upwards depends on whether a Parallel-Selector or aParallel-Sequence is used. Parallel-Selector return Successif any of its children returned Success, otherwise returnsFailure. Parallel-Sequence returns Success if all of its chil-dren returned Success, otherwise returns Failure. Leaf

?

c1 a1

(a) Selector

c1 a1

(b) Sequence

Inverter a1

c1

(c) Decorator

⇶→

a1 a2

(d) Decorator

Figure 3. Composite nodes in Behavior Trees

nodes of BTs are input-output nodes that interact with anenvironment. A leaf node can either be a condition node oran action node.

Condition nodes check whether a condition is satisfied, andreturn the status Success in that particular case. A conditionnode only passively observes the environment and neverreturns the signal Running. A condition might consist ofseveral sub-conditions or sensor values coming from multi-ple independent or dependent features.

Action nodes execute an actual action in an environment.Executing an action in an environment changes the state ofthe environment and therefore impacts the subsequent nodeswithin the same tick. An action node returns Success if theaction is completed, Failure if it couldn’t get completed,and Running if the action did not finish immediately and isstill running. When combining condition nodes and actionnodes, arbitrary instinctive behaviors can be described witha BT (Hallawa et al., 2017).

Page 5: Evo-RL: Evolutionary-Driven Reinforcement LearningEvo-RL: Evolutionary-Driven Reinforcement Learning Ahmed Hallawa1 2 Thorsten Born 3Anke Schmeink Guido Dartmann4 Arne Peine2 Lukas

Evolutionary-Driven Reinforcement Learning

5. Experimental EvaluationWe designed our experimental evaluation to test the fol-lowing statements: (1) The performance of reinforcementlearning algorithms is enhanced when embedded in the Evo-RL approach for environments with rewardless states, withthe same fixed computational budget. (2) The performanceof Evo-RL is better than the evolutionary algorithm partalone (i.e., Evo-RL without the reinforcement learning). Inother words, we want to show that instinctive behaviourplus learnable behaviour (Evo-RL) outperforms adoptingonly instinctive behaviour (EA-only) or only learnable be-haviour (RL-only). (3) As the rewardless states increase inan environment, the ratio of instinctive behaviour executed,compared to the learnable one, increases as well. This showsthat the instinctive behaviour is necessary to handle moreefficiently the rewardless states.

Figure 4. Example of marking 30% of all states as rewardless forthe MountainCar problem (2D state space). The overall state spaceis binned into 256 bins. Hashed states denote a rewardless state.

In order to facilitate testing on environments with a reward-less state, we modified three OpenAI gym control problems1

to obtain rewardless state problems: Cartpole, Acrobot andMountainCar. The modifications can be summarized as fol-lows: the state space of each problem is discretized into bins.Whenever a problem is initialized, a predefined percentageof these bins is marked as rewardless states. If, while learn-ing, an agent reaches one of those states, no feedback fromthe environment is given back to the agent. In our experi-ments, we tried setting the percentage of rewardless statesto 0%, 10%, 20%, 30%, 40% and 50%. An example of astate space with rewardless states is shown in Figure 4. Inour experiments, we chose three RL algorithms: Q-learning,PPO and DQN. In addition, for the EA-only case, we chose

1https://gym.openai.com/envs/#classic_control

genetic programming (GP) as it is also used in our imple-mentation of Evo-RL (or goal is not, indeed, to compare theperformance of different EAs). For all algorithms, we setthe computational budget to 60,000 evaluations. In Evo-RL,for the EA part, a population of 30 agents per generationis adopted and the number of generations is chosen to be200. Each individual is given 10 episodes for training in thereinforcement learning phase. Therefore, the total budgetis 60,000 evaluations (200 (generations) × 30 (individualsper generation) × 10 (learning episodes per individual) =60,000 (evaluations). In the EA-only case, 2,000 generationsare used in order to reach the 60,000 evaluations (30 (gener-ations) × 2000 (individual per generation)). In the RL-onlycase, each agent is given 60,000 episodes for training.

For both Evo-RL and EA-only cases, the adopted selec-tion scheme is tournament selection with 3 candidates, thecrossover rate is 50%, the mutation rate is 15%, and themutation rate for the inherited behavior is 20% with an in-dependent probability of 10% mutating each element. Dueto the stochastic nature of the experiments, each agent isevaluated 100 times and only the average performance isconsidered. All experiments are repeated 10 times and allresults are presented in the form of mean and Standard Errorof the Mean (SEM). The SEM is defined as the standarddeviation weighted by the square root of the number of ob-servations/trials (in our case N = 10) (Mcbratney, 2004):

σ−x =

σ√N, N = 10 (1)

Figure 5 shows the performance of Q-learning, PPO andDQN in the first row; the second row shows the performanceof each of those algorithms when operating within Evo-RL(denoted by adding the prefix “e-”). The red straight lineshows the reward threshold, i.e., the value of reward to reachin order to consider the problem solved and thus terminatethe experiment. For CartPole it is 195, and for Acrobot it is-100. As shown, the performance of all RL algorithms whenoperating alone deteriorate as the percentage of rewardlessstates increases. On the other hand, the Evo-RL versionof each of those algorithms converges and the problem issolved in most of the cases within the given computationalbudget.

Furthermore, Figure 7 shows the ratio of instinctive be-haviour relative to the learned behaviour for the CartPoleproblem when adopting e-Q learning. As shown in thefigure, the instinctive behaviour increases as the ratio ofrewardless states increases.

Figure6 shows the performance of the EA-only case forthe three problems. Finally, Tables 1 and 2 summarizethe final rewards after the last evaluation for all problemsand algorithms. The number after the “@” denotes thenumber of evaluations needed for solving the problem. Blueindicates that the problem is completely solved and red

Page 6: Evo-RL: Evolutionary-Driven Reinforcement LearningEvo-RL: Evolutionary-Driven Reinforcement Learning Ahmed Hallawa1 2 Thorsten Born 3Anke Schmeink Guido Dartmann4 Arne Peine2 Lukas

Evolutionary-Driven Reinforcement LearningRew

ard

200

150

100

50

0 15000 30000 45000 60000Episode

Reward Treshold 195Rewardless States: 0%Rewardless States: 10%Rewardless States: 20%Rewardless States: 30%Rewardless States: 40%Rewardless States: 50%

(a) Q-learning (CartPole)

Rew

ard

200

150

100

50

0 15000 30000 45000 60000Episode

Reward Treshold 195Rewardless States: 0%Rewardless States: 10%Rewardless States: 20%Rewardless States: 30%Rewardless States: 40%Rewardless States: 50%

(b) DQN (CartPole)

Rew

ard

200

150

100

50

0 15000 30000 45000 60000Episode

Reward Treshold 195Rewardless States: 0%Rewardless States: 10%Rewardless States: 20%Rewardless States: 30%Rewardless States: 40%Rewardless States: 50%

(c) PPO (CartPole)

Rew

ard

200

150

100

50

0 15000 30000 45000 60000Episode

0 50 100 150 200Generation

Reward Treshold 195Rewardless States: 0%Rewardless States: 10%Rewardless States: 20%Rewardless States: 30%Rewardless States: 40%Rewardless States: 50%

(d) e-Q learning (CartPole)

Rew

ard

200

160

120

80

400 15000 30000 45000 60000

Episode

0 50 100 150 200Generation

Reward Treshold 195Rewardless States: 0%Rewardless States: 10%Rewardless States: 20%Rewardless States: 30%Rewardless States: 40%Rewardless States: 50%

(e) e-DQN (CartPole)

0 50 100 150 200Generation

Rew

ard

200

150

100

50

0 15000 30000 45000 60000Episode

Reward Treshold 195Rewardless States: 0%Rewardless States: 10%Rewardless States: 20%Rewardless States: 30%Rewardless States: 40%Rewardless States: 50%

(f) e-PPO (CartPole)

Rew

ard

-500

-400

-300

-200

-100

0 15000 30000 45000 60000Episode

Reward Treshold -100Rewardless States: 0%Rewardless States: 10%Rewardless States: 20%Rewardless States: 30%Rewardless States: 40%Rewardless States: 50%

(g) Q learning (Acrobot)

Rew

ard

-500

-400

-300

-200

-100

0 15000 30000 45000Episode

60000

Reward Treshold -100Rewardless States: 0%Rewardless States: 10%Rewardless States: 20%Rewardless States: 30%Rewardless States: 40%Rewardless States: 50%

(h) DQN (Acrobot)

Rew

ard

-100

-200

-300

-400

-5000 15000 30000 45000 60000

Episode

Reward Treshold -100Rewardless States: 0%Rewardless States: 10%Rewardless States: 20%Rewardless States: 30%Rewardless States: 40%Rewardless States: 50%

(i) PPO (Acrobot)

Rew

ard

-100

-200

-300

-400

0 15000 30000 45000 60000Episode

0 50 100 150 200Generation

Reward Treshold -100Rewardless States: 0%Rewardless States: 10%Rewardless States: 20%Rewardless States: 30%Rewardless States: 40%Rewardless States: 50%

(j) e-Q learning (Acrobot)

Rew

ard

-100

-200

-300

0 15000 30000 45000 60000Episode

0 50 100 150 200Generation

Reward Treshold -100Rewardless States: 0%Rewardless States: 10%Rewardless States: 20%Rewardless States: 30%Rewardless States: 40%Rewardless States: 50%

(k) e-DQN (Acrobot)

Rew

ard

-100

-200

-300

0 15000 30000 45000 60000Episode

0 50 100 150 200Generation

Reward Treshold -100Rewardless States: 0%Rewardless States: 10%Rewardless States: 20%Rewardless States: 30%Rewardless States: 40%Rewardless States: 50%

(l) e-PPO (Acrobot)

Figure 5. Results of the CartPole and Acrobot problems (mean and SEM over 10 trials). Each algorithm is tested on different percentagesof rewardless states: 0%, 10%, 20%, 30%, 40% and 50%. Each case is presented by a different color. Generally, as the percentageof rewardless states increases, the performance of the algorithm deteriorates. The eRL version for all algorithms outperforms thecorresponding (RL-only) stand-alone version.

indicates that it was not solved. Of note, some runs ofEvo-RL missed the reward threshold with a small marginand, based on the convergence rate, they would have likelysolved the problem if given more evaluations.

6. Discussion and Future workThe presented hybrid approach REAL outperforms EA onlyand RL only, even when adopting state-of-the-art RL algo-rithms such as PPO and DQN. Our approach has a number

Page 7: Evo-RL: Evolutionary-Driven Reinforcement LearningEvo-RL: Evolutionary-Driven Reinforcement Learning Ahmed Hallawa1 2 Thorsten Born 3Anke Schmeink Guido Dartmann4 Arne Peine2 Lukas

Evolutionary-Driven Reinforcement LearningRew

ard

200

150

100

50

0 15000 30000 45000 60000Evaluation

0 500 1000 1500 2000Generation

Reward Treshold 195Rewardless States: 0%Rewardless States: 10%Rewardless States: 20%Rewardless States: 30%

(a) Cart Pole Problem

Rew

ard

-100

-200

-300

-400

-5000 15000 30000 45000 60000

Evaluation

0 500 1000 1500 2000Generation

Reward Treshold -100Rewardless States: 0%Rewardless States: 10%Rewardless States: 20%Rewardless States: 30%

(b) Acrobot Problem

Rew

ard

-200

-160

-120

0 15000 30000 45000 60000Evaluation

0 500 1000 1500 2000Generation

Reward Treshold -110Rewardless States: 0%Rewardless States: 10%Rewardless States: 20%Rewardless States: 30%

(c) MountainCar Problem

Figure 6. Results of the CartPole, Acrobot and MountainCar problems in case of using EA-only for different percentages of rewardlessstates: 0%, 10%, 20%, 30%, 40% and 50% (mean and SEM over 10 trials).

Table 1. Final rewards after 60,000 evaluations (mean and SEM over 10 trials). Top: EA-only, Q-Learning and eQ-learning (ours). Down:PPO, ePPO (ours), DQN and eDQN (ours). The number after the ”@” denotes the number of evaluations needed for solving the problem.Blue indicates that the problem is solved and red indicates the opposite.

Environment RewardlessStates [%]

EA-Only Q-learning eQ-learning (ours)

CartPole-v0 0% 140.9 ±20.2 195.3 ±0.1 @ 910 196.3 ±0.3 @ 10,80010% 101.3 ±18.0 118.4 ±25.9 196.0 ±0.4 @ 51,00020% 115.1 ±19.8 78.8 ±24.1 196.2 ±0.3 @ 31,20030% 155.1 ±17.0 63.9 ±21.0 196.2 ±0.4 @ 31,20040% N.A. 42.2 ±16.4 194.8 ±1.0

50% N.A. 41.8 ±16.6 192.0 ±3.2

Acrobot-v1 0% -109.5 ±6.5 -249.6 ±12.5 -88.6 ±2.2 @ 43,50010% -106.5 ±5.9 -298.6 ±32.9 -96.3 ±1.2 @ 43,20020% -108.2 ±5.3 -344.9 ±40.4 -96.6 ±1.0 @ 33,90030% -99.1 ±5.8 @ 10,860 -344.8 ±40.9 -98.9 ±2.6 @ 55,80040% N.A. -430.3 ±33.7 -97.0 ±2.3 @ 49,80050% N.A. -464.8 ±25.8 -99.6 ±2.4 @ 56,700

Table 2.Environment PPO ePPO (ours) DQN eDQN (ours)CartPole 0% 195.2 ±0.0 @ 4,370 196.9 ±0.3 @ 14,400 195.5 ±0.1 @ 160 198.8 ±0.6 @ 1200

10% 151.9 ±20.9 197.0 ±0.5 @ 56,100 195.5 ±0.1 @ 880 199.5 ±0.4 @ 90020% 125.6 ±18.9 196.8 ±0.5 @ 51,900 195.6 ±0.1 @ 3680 199.5 ±0.2 @ 90030% 114.6 ±18.8 196.1 ±0.2 @ 51,600 142.9 ±25.4 199.2 ±0.5 @ 210040% 112.6 ±16.5 198.0 ±0.5 @ 47,100 139.6 ±26.9 198.1 ±0.6 @ 3210050% 81.0 ±20.5 196.9 ±0.3 @ 31,500 121.0 ±28.8 198.5 ±0.6 @ 45600

Acrobot 0% -99.0 ±0.2 @ 12,300 -99.0 ±0.2 @ 12,300 -99.7 ±0.1 @ 1,270 -95.8 ±0.8 @ 1,50010% -179.1 ±50.7 -97.3 ±1.0 @ 47,100 -118.0 ±17.7 -94.1 ±1.3 @ 2,40020% -259.3 ±61.9 -97.2 ±0.9 @ 5,700 -99.8 ±0.1 @ 13,120 -96.3 ±0.9 @ 1,50030% -299.7 ±63.3 -98.3 ±0.4 @ 15,000 -99.7 ±0.1 @ 19,340 -90.3 ±2.1 @ 7,80040% -353.6 ±52.4 -97.3 ±0.7 @ 50,400 -139.5 ±38.0 -93.1 ±1.3 @ 6,30050% -427.5 ±46.2 -101.2 ±5.5 -175.6 ±45.9 -90.8 ±1.5 @ 6,600

MountainCar 0% -200.0 ±0.0 -136.5 ±1.3 -189.3 ±6.8 -106.8 ±0.6 @ 17,10010% -200.0 ±0.0 -133.5 ±1.4 -192.0 ±5.1 -107.0 ±0.7 @ 19,50020% -197.3 ±2.2 -131.5 ±1.0 -200.0 ±0.0 -107.8 ±0.5 @ 57,60030% -195.6 ±2.5 -133.0 ±1.5 -199.1 ±0.9 -110.0 ±1.6

Page 8: Evo-RL: Evolutionary-Driven Reinforcement LearningEvo-RL: Evolutionary-Driven Reinforcement Learning Ahmed Hallawa1 2 Thorsten Born 3Anke Schmeink Guido Dartmann4 Arne Peine2 Lukas

Evolutionary-Driven Reinforcement Learning

Generation0 25 50 75 100 125 150 175 200

Episode0 7500 15000 22500 30000 37500 45000 52500 60000

Rew

ard

Inst

inct

ive

Act

ion

sIn

stin

ctiv

e A

ctio

ns

Inst

inct

ive

Act

ion

sIn

stin

ctiv

e A

ctio

ns

Inst

inct

ive

Act

ion

sIn

stin

ctiv

e A

ctio

ns

200

150

100

50

60%

40%

20%

60%

40%

20%

60%

40%

20%

60%

40%

20%

60%

40%

20%

60%

40%

20%

Reward Treshold: 195Rewardless States: 0%Rewardless States: 10%Rewardless States: 20%Rewardless States: 30%Rewardless States: 40%Rewardless States: 50%

Figure 7. Top: convergence plot of e-Q learning with different onthe CartPole problem with rewardless states: 0%, 10%, 20%, 30%,40% and 50%. The remaining plots present the ratio of actionsexecuted by the instinctive behaviour when solving the CartPoleproblem for environments with different rewardless states 0%,10%, 20%, 30%, 40% and 50%. As the percentage of reward-less states increases, the behaviour relies more on the instinctivebehaviour.

of points of strength: it integrates RL in an EA framework,hence benefiting from both methodologies. Furthermore,it works with any RL algorithm and can handle problemswhere the reward function is not valid in all states.

For future work, we acknowledge the importance of ap-plying this algorithm on real-world problems where thestate space has rewardless states, e.g., due to the ambigu-ity of the environment or to the complexity of defining areward function suited for the majority of states in that en-vironment. Further, we will adapt our work for solvingmeta-learning problems, as achieved for instance in (Finnet al., 2017), (Wang et al., 2016), (Wang et al., 2019) and(Li et al., 2017).

ReferencesCristian Bodnar, Ben Day, and Pietro Lio. Proximal

distilled evolutionary reinforcement learning. CoRR,abs/1906.09807, 2019. URL http://arxiv.org/abs/1906.09807.

AE Eiben, Nicolas Bredeche, M Hoogendoorn, J Stradner,J Timmis, A Tyrrell, A Winfield, et al. The triangle of life:Evolving robots in real-time and real-space. Advances inartificial life, ECAL, 2013:1056, 2013.

Chelsea Finn, Pieter Abbeel, and Sergey Levine. Model-agnostic meta-learning for fast adaptation of deep net-works. In Proceedings of the 34th International Confer-ence on Machine Learning-Volume 70, pages 1126–1135.JMLR. org, 2017.

Iztok Fister, Damjan Strnad, Xin-She Yang, and Iztok Fis-ter Jr. Adaptation and hybridization in nature-inspiredalgorithms. In Adaptation and Hybridization in Compu-tational Intelligence, pages 3–50. Springer, 2015.

Ahmed Hallawa, Jaro De Roose, Martin Andraud, MarianVerhelst, and Gerd Ascheid. Instinct-driven DynamicHardware Reconfiguration: Evolutionary Algorithm Op-timized Compression for Autonomous Sensory Agents.In Proceedings of the Genetic and Evolutionary Compu-tation Conference Companion, GECCO ’17, pages 1727–1734, New York, NY, USA, July 2017. ACM. ISBN978-1-45034-939-0. doi: 10.1145/3067695.3084202.

Perttu Hamalainen, Amin Babadi, Xiaoxiao Ma, andJaakko Lehtinen. Ppo-cma: Proximal policy optimiza-tion with covariance matrix adaptation. arXiv preprintarXiv:1810.02541, 2018.

Geoffrey E Hinton and Steven J Nowlan. How learning canguide evolution. Complex systems, 1(3):495–502, 1987.

Shauharda Khadka, Somdeb Majumdar, Tarek Nassar, ZachDwiel, Evren Tumer, Santiago Miret, Yinyin Liu, andKagan Tumer. Collaborative evolutionary reinforcementlearning. arXiv preprint arXiv:1905.00976, 2019.

Kyung-Joong Kim, Heejin Choi, and Sung-Bae Cho. Hy-brid of evolution and reinforcement learning for othelloplayers. In 2007 IEEE Symposium on ComputationalIntelligence and Games, pages 203–209. IEEE, 2007.

Matthieu Komorowski, Leo A Celi, Omar Badawi, An-thony C Gordon, and A Aldo Faisal. The Artificial Intel-ligence Clinician learns optimal treatment strategies forsepsis in intensive care. Nature Medicine, 24(11):1716,2018.

Page 9: Evo-RL: Evolutionary-Driven Reinforcement LearningEvo-RL: Evolutionary-Driven Reinforcement Learning Ahmed Hallawa1 2 Thorsten Born 3Anke Schmeink Guido Dartmann4 Arne Peine2 Lukas

Evolutionary-Driven Reinforcement Learning

Dimitris E Koulouriotis and A Xanthopoulos. Reinforce-ment learning and evolutionary algorithms for non-stationary multi-armed bandit problems. Applied Mathe-matics and Computation, 196(2):913–922, 2008.

Zhenguo Li, Fengwei Zhou, Fei Chen, and Hang Li. Meta-sgd: Learning to learn quickly for few-shot learning.arXiv preprint arXiv:1707.09835, 2017.

Alex Mcbratney. Everitt, B.S., 2002. The Cambridge Dic-tionary of Statistics. 2nd edition, volume 121. 07 2004.doi: 10.1016/j.geoderma.2003.11.001.

Volodymyr Mnih, Koray Kavukcuoglu, David Silver, An-drei A Rusu, Joel Veness, Marc G Bellemare, AlexGraves, Martin Riedmiller, Andreas K Fidjeland, GeorgOstrovski, et al. Human-level control through deep rein-forcement learning. Nature, 518(7540):529–533, 2015.

Aloıs Pourchot and Olivier Sigaud. CEM-RL: combin-ing evolutionary and gradient-based methods for pol-icy search. CoRR, abs/1810.01222, 2018. URL http://arxiv.org/abs/1810.01222.

John Schulman, Filip Wolski, Prafulla Dhariwal, Alec Rad-ford, and Oleg Klimov. Proximal policy optimizationalgorithms. arXiv preprint arXiv:1707.06347, 2017.

Jane X Wang, Zeb Kurth-Nelson, Dhruva Tirumala, Hu-bert Soyer, Joel Z Leibo, Remi Munos, Charles Blundell,Dharshan Kumaran, and Matt Botvinick. Learning toreinforcement learn. arXiv preprint arXiv:1611.05763,2016.

Rui Wang, Joel Lehman, Jeff Clune, and Kenneth OStanley. Paired open-ended trailblazer (poet): End-lessly generating increasingly complex and diverse learn-ing environments and their solutions. arXiv preprintarXiv:1901.01753, 2019.