Arxiv:1903.08543V4 [Cs.NE] 6 Aug 2021

Arxiv:1903.08543V4 [Cs.NE] 6 Aug 2021

Optimizing thermodynamic trajectories using evolutionary and gradient-based reinforcement learning Chris Beeler1;2,∗ Uladzimir Yahorau3, Rory Coles4, Kyle Mills3;5, Stephen Whitelam6, and Isaac Tamblyn1;2;3;5y 1University of Ottawa, Ottawa, ON, Canada 2National Research Council of Canada, Ottawa, ON, Canada 3University of Ontario Institute of Technology, Oshawa, ON, Canada 4University of Victoria, Victoria, BC, Canada 5Vector Institute for Artificial Intelligence, Toronto, Ontario, Canada 6Molecular Foundry, Lawrence Berkeley National Laboratory, Berkeley, CA, USA (Dated: August 17, 2021) Using a model heat engine, we show that neural network-based reinforcement learning can iden- tify thermodynamic trajectories of maximal efficiency. We consider both gradient and gradient-free reinforcement learning. We use an evolutionary learning algorithm to evolve a population of neural networks, subject to a directive to maximize the efficiency of a trajectory composed of a set of ele- mentary thermodynamic processes; the resulting networks learn to carry out the maximally-efficient Carnot, Stirling, or Otto cycles. When given an additional irreversible process, this evolutionary scheme learns a previously unknown thermodynamic cycle. Gradient-based reinforcement learning is able to learn the Stirling cycle, whereas an evolutionary approach achieves the optimal Carnot cycle. Our results show how the reinforcement learning strategies developed for game playing can be applied to solve physical problems conditioned upon path-extensive order parameters. Introduction { Games, whether played on a board, such physical problems of a path-extensive nature. as chess or Go, or played on the computer, are a ma- Motivated by this speculation, we show here that neu- jor component of human culture [1]. In the language of ral network-based reinforcement learning can maximize physics, instances of a game are trajectories, time-ordered the efficiency of the simplest type of physical trajectories, sequences of elementary steps. The outcome of a game is the deterministic, quasi-static ones of classical thermody- a path-extensive order parameter determined by the en- namics. We introduce a model heat engine characterized tire history of the trajectory. Playing games was once the by a set of thermodynamic state variables. A neural net- preserve of human beings, but machine learning methods, work takes as input the current observation of the engine more specifically reinforcement learning, now outperform and chooses one of a set of basic thermodynamic pro- the most talented humans in all the aforementioned ex- cesses to produce a new observation; this change com- amples [2{19]. While there are more scientific examples prises one step of a trajectory. We chose this simple and of reinforcement learning [20{25], we choose to compare well-known system for pedagogical purposes. Using an with games as they are the easiest applications to under- easy-to-understand system allows us to focus on how re- stand. Motivated by the correspondence between games inforcement learning methods can be applied to physics and trajectories, it is natural to ask how the machine- problems. We generate a set of trajectories of fixed length learning and optimal control methods that have mastered using a set of networks whose parameters are initially game-playing might be applied to understand physical randomly chosen and optimized using two different meth- processes whose outcomes are path-extensive quantities. ods. In the first method (gradient-free), we retain and arXiv:1903.08543v5 [cs.NE] 17 Aug 2021 There are many examples of such processes. For in- mutate only those networks whose trajectories show the stance, the success or failure of molecular self-assembly greatest thermal efficiency. Repeating this evolutionary is determined by a time history of elementary dynamical process many times results in networks whose trajecto- processes, including the binding and unbinding of parti- ries reproduce the maximally efficient Carnot, Stirling, cles [26{29]. Dynamical systems, such as chemical net- or Otto cycles, depending upon which basic thermody- works and molecular machines [30{33], are characterized namic processes are allowed. This evolutionary proce- by time-extensive observables, such as work or entropy dure can also learn previously unknown thermodynamic production [34{40]. In none of these cases do we possess cycles if new processes are allowed. In the second method a complete theoretical or practical understanding of how (gradient-based), we update the network parameters us- to build an arbitrary structure or maximize the efficiency ing gradient-based reinforcement learning. In this study, of an arbitrary machine. Traditional methods of inquiry we explore how a reinforcement learning problem must in physics focus on applying physical intuition and the be framed and the types of solutions acquired by these manipulation and simulation of equations; perhaps ma- two methods. We also compare the advantages and dis- chine learning can provide us with further insight into advantages of each in finding a solution to this problem. 2 FIG. 1. (a) Model heat engine and (b) the neural network that controls it. Note that the diagram of the neural network has two additional input nodes for the gradient-based reinforcement learning method. (c) A summary of the actions in P -V space available to the network; see Table I. Model heat engine and thermodynamic trajectories { (K = 200). In Fig. 1(a) we show a model heat engine, a device able The elementary actions available to the network cor- to transform thermal energy into work [41, 42]. The en- respond to the basic thermodynamic processes shown gine consists of a working substance, which we assume in Table I, summarized graphically in Fig. 1(c). These to be a monatomic ideal gas, housed within a friction- processes include reversible compression and expansion, less container of variable volume V , whose minimum and along isotherms or adiabats, and reversible temperature maximum values are Vmin and Vmax, respectively. The changes along isochores. Implicitly this means infinitely working substance may be connected to a hot or cold many heat baths spaced between Th and Tc are available, reservoir held at temperature, Th = 500 K and Tc = 300 a condition, which we shall prove, does not undermine K, respectively. During adiabatic processes, no heat is Carnot's Theorem of maximum efficiency. Using T -S di- exchanged with the environment. For the gradient-free agrams, shown in Fig. 2, the thermal efficiency of a cycle method, the instantaneous observation st of the system is determined by η = ∆W=(∆W + Qout) where ∆W is at time t is then specified by the volume-temperature vec- the work produced by the system and Qout is the heat tor st = (V; T ), with the pressure of the system fixed by removed from the system. Using Fig. 2(a), the thermal the ideal-gas equation PV = NkBT [43]. Further on, we efficiency of the Carnot cycle is will discuss the reasons this formulation of the problem Tc cannot be used for gradient-based reinforcement learning ηmax = 1 − ; (1) methods. Th To evolve the heat engine we use the neural network which is independent of the minimum and maximum en- C shown in Fig. 1(b). The network is a nonlinear function tropies reach by the Carnot cycle, denoted by Smin and C C that takes as input the current observation st of the sys- Smax respectively. For cycles that operate between Smin C tem, and outputs the probabilities πθ(atjst) of moving and Smax, since Tc is the minimum temperature the sys- to any new observation st+1 through a thermodynamic tem can reach, η is maximized by maximizing ∆W and process at 2 fa1; a2; : : : ; aM g (in the language of rein- minimizing Qout, which results in the Carnot cycle. Now forcement learning this mapping is called a policy [44]). consider cycles that operate outside of the entropy range C C The symbol θ denotes the internal parameters of the net- Smin to Smax, such as the ones shown in Fig. 2(b) and work, discussed shortly. Here we consider determinis- (c). It is impossible for the system to simultaneously be ∗ C tic evolution through configuration space, with πθ(at jst) at Th and an entropy less than Smin, therefore the ra- ∗ equal to 1 for a chosen process at , and equal to zero tio of work produced and heat removed by the system otherwise. Enacting the chosen process corresponds to between points II and III will be less than that of the one step of a trajectory. Given an initial observation Carnot cycle. Similarly, it is impossible for the system s0, K applications of the network produces a trajectory to simultaneously be at Tc and and entropy greater than C ! = s0 ! s1 !···! sK of K steps through config- Smax, therefore the ratio of work produced and heat re- uration space. We focus on trajectories of fixed length moved by the system between points IV and I will be 3 FIG. 2. T -S diagram for the (a) Carnot, (b) discretized Carnot, and (c) Stirling cycles. The red area (labelled Qout) represents the heat removed from the system, the white area (labelled ∆W ) represents the work produced by the system, and the the red and white areas together represent the heat added to the system. less than the Carnot cycle. Putting all these together, efficient thermodynamic cycles. We could terminate a C C any cycle operating within Smin and Smax is at most ef- trajectory after it produces a single cycle, however we ficient as the Carnot cycle, and any cycle operating out- chose this way for consistency with the gradient-based C C side of Smin and Smax is less efficient, therefore Carnot's reinforcement learning method used where we do require theorem holds for infinitely many heat bathes. All com- multiple cycles. pression and expansion processes are performed using a The neural network, which contains two layers of tun- fixed change in volume.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    10 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us