원시데이터 수집 시스템
선정목록으로

Reinforcement learning algorithms for the Untangling of Braids

관련 필름·전자재료 · (11) 배리어 필름

기본 정보

저자
  1. Abdullah Khan — University of Essex
  2. Alexei Vernitski — university of essex
  3. Alexei Lisitsa — university of liverpool
DOI
10.32473/flairs.v35i.130657
저널
Proceedings of the ... International Florida Artificial Intelligence Research Society Conference
발행년도
2022
발행기관
George A. Smathers Libraries
피인용수
2
라이선스
cc-by-nc
논문 유형
–
언어
–
원문 페이지
https://doi.org/10.32473/flairs.v35i.130657
토픽
Gear and Bearing Dynamics Analysis
OpenAlex ID
W4225380649

평가 내용

관련도
관련
사업분야
필름·전자재료 · (11) 배리어 필름
부 분야
–
R&D 측면
–
확신도
–
근거 용어
–
판단 근거
임베딩 유사도 기반 평가로 '필름·전자재료 > 배리어 필름' 분야에 선정된 논문입니다.
R&D 활용 포인트
–
평가 입력
–

초록

We use reinforcement learning algorithms (Q-Learning and Deep Q-Learning) to tackle the problem of untangling braidsand to compare the results of both algorithms. The idea is to use multi-agent (two competing players) based approachto tackle the problem of untangling braids. We interface the braid untangling problem with the OpenAI Gym envi-ronment, a widely used way of connecting agents to reinforcement learning problems. The results provide evidencethat the more we train the system, the better the untangling player gets for both approaches at untangling braids. Thecomparison of both approaches produces interesting results, where Q- learning performs better while dealing with braidsof shorter length, whereas DQN performs slightly better while dealing with braids of longer lengt

본문 32,428자

본문 펼치기
# Reinforcement learning algorithms for the Untangling of Braids Abdullah Khan <sup>_∗_</sup>, Alexei Lisitsa <sup>_†_</sup>, Alexei Vernitski <sup>_∗_</sup> _∗_ University of Essex, Colchester CO4 3SQ, United Kingdom. _(ak20749,asvern)@essex.ac.uk_ _†_ University of Liverpool, L69 3BX, United Kingdom. _A.Lisitsa@liverpool.ac.uk_ Abstract We use reinforcement learning algorithms (Q-Learning and Deep Q-Learning) to tackle the problem of untangling braids and to compare the results of both algorithms. The idea is to use multi-agent (two competing players) based approach to tackle the problem of untangling braids. We interface the braid untangling problem with the OpenAI Gym environment, a widely used way of connecting agents to reinforcement learning problems. The results provide evidence that the more we train the system, the better the untangling player gets for both approaches at untangling braids. The comparison of both approaches produces interesting results, where Q- learning performs better while dealing with braids of shorter length, whereas DQN performs slightly better while dealing with braids of longer length. Introduction Braids are mathematical objects from low-dimensional topology which can be successfully encoded with sequences of letters and, therefore, studied using algebra or, as we do in this study, using some computer-scientific approach. A braid on _n_ strands consists of _n_ ropes whose left-hand ends are fixed one under another and whose righthand ends are fixed one under another; you can imagine that the braid is laid out on a table, and the ends of the ropes are attached to the table with nails. Figures 1, 2, 3 show examples of braids on 3 strands. Figure 1: Braid _aabaBBAB_ Few of the interesting application of braids, e.g., in the field of biology they can be used to examine the ability of enzymes to add or remove tangles from DNA; in chemistry, they allow us to describe the structure of topological stereoisomers, or molecules with the same atoms but different configurations; whereas in physics, graphs used in braids to create interesting models for examining the way in Copyright © 2021by the authors. All rights reserved. Figure 2: Braid _baBABaBb_ which particles interact. In the context of the current study, untangling braids with reinforcement learning is important as a step towards using reinforcement learning to solve a more general mathematical problem known as the _word_ _problem_ _in_ _groups_ ; making progress in this direction is generally useful for training computers to prove theorems and conduct mathematical research. Two braids are _equivalent_ to one another if they can be transformed into one another by shifting and twisting the middle parts of the ropes (without touching the ends of the ropes). For example, the two braids in Figures 1, 2 are equivalent to one another, although it is difficult to see it. They are also what is called _trivial_ braids, in the sense that they are equivalent to the braid without any intersections of ropes, shown in Figure 3. Figure 3: The trivial braid without intersections Now let us explain how braids can be represented conveniently in the computer. A braid is considered as a sequence of its simple fragments; for braids on 3 strands, these are the fragments shown in Figure 4, which we denote by _A, a, B, b,_ 1 (and which in mathematical papers are usually denoted by _σ_ 1 _, σ_ 1 <sup>_−_</sup> <sup>1</sup> <sup>_, σ_</sup> <sup>2</sup> <sup>_, σ_</sup> 2 <sup>_−_</sup> <sup>1</sup> <sup>_,_</sup> <sup>1).</sup> Using this convenient notation, we can now say that the braids in Figures 1, 2 are _aabaBBAB_ and _baBABaBb_ . This notation is useful not only for describing braids, but also for checking if two braids are equivalent. Indeed, it is known that two braids are equivalent if and only if one can be transformed to the other using rules called the second Figure 4: Braid fragments _A, a, B, b,_ 1 Reidemeister move and the third Reidemeister move. The _second_ _Reidemeister_ _move_ is the rule stating that _Aa_ and _aA_ are equivalent to 11, and _Bb_ and _bB_ are also equivalent to 11. (An algebraist studying braids in the context of group theory would also add that 11 is equivalent to 1; however, we felt that the performance of our AI will be best if we omit this non-essential rule). The _third_ _Reidemeister_ _move_ is the rule stating that _ABA_ is equivalent to _BAB_ . A recent study (Gukov et al., 2021) uses RL to untangle knots using a version of Reidemeister moves known as Markov moves. The novelty of our approach is the use two agents: one for tangling and one for untangling. Recent success of reinforcement learning (RL) in many interesting problems, such as playing the game of Go (Silver et al., 2017), playing card games (Brown and Sandholm, 2019), and autonomous driving (Shalev-Shwartz et al., 2016) mostly involve the participation of more than one single agent/player, and such problems are modeled as multi-agent RL (MARL) problems. MARL addresses the autonomous agents that operate in a common environment, each of which aims to optimize its own long term return by interacting with the environment. Multi-agent systems can be placed in different groups e.g., _cooperative_, _com-_ _petitive_ depending on the types of settings. In particular, in the cooperative setting, agents collaborate to optimize a common long-term return; while in the competitive setting, they have opposite goals with reward of one agent is the loss of the other. We experimented with braids with three strands using (Q-Learning and Deep Q-Learning), where following transformations are allowed, Aa=aA=11; Bb=bB=11; A1=1A; a1=1a; B1=1B; b1=1b, ABA=BAB. We approach the problem of untangling braids on 3 strands as a game played between two players, player 1 (the tangling player) and player 2 (the untangling player). Player 1 starts with an untangled braid as in Figure 3 with specific length of the input and applies _Reidemeister_ _moves_ to tangle the braid. For example, braids in Figures 1, 2 were produced by player 1 after approximately 150 games against player 2. Once player 1 has created a tangled braid after a fixed number of steps, that would be the input for the player 2 (untangling player); the task of player 2 is to apply _Reidemeister moves_ to reach a fixed target output, that would be all 1’s (untangled state). We use OpenAI Gym (Brockman et al., 2016) an interface which provides a number of environments to implement reinforcement learning problems. The benefit of interfacing with OpenAI Gym is that it is an actively developed interface which allows to add environments and features useful while training the model. The paper is organized as follows: in the following sec tion we discuss the Background taking into consideration basics towards Q-Learning and Deep Q-Learning, state-ofthe-art, setting up the environment to actions and rewards. In Section 3, we mention about the experimental details and results. Background In this section, we formally highlight the important concepts for the understanding and development of the project, and also highlight some of the relevant work in the domain of reinforcement learning specifically for games. Reinforcement learning is the training of machine learning models to make a sequence of decisions, where the agent learns to achieve a goal in an uncertain, potentially complex environment(Kaelbling et al., 1996). In RL, there is a gamelike situation, where the computer employs trial and error to come up with a solution to the problem. Basically, during the whole learning process, the agent gets either rewards or penalties for the actions it performs. The overall goal is to maximize the total rewards. Q-Learning Maximum predicted reward, given rate rate As discussed in our previous work (Khan et al., 2021), Q-learning makes use of the Bellman equation. Where the first term, Q(s, a) is the value of the current action in the current state, alpha is the learning rate that controls how much the difference between previous and new Q-value is considered. Gamma is a discount factor, which is used to balance between immediate and future reward. The updates occur after each step or action, and ends when an episode is done (reaching the terminal point). The agent will not learn much after initial episodes, but eventually with enough exploring (steps and episodes) it will converge and learn the optimal Q-values. <u>Algorithm</u> <u>1:</u> <u>Q-learning</u> <u>(Sutton</u> <u>and</u> <u>Barto,</u> <u>2018)</u> Initialize _Q_ ( _s, a_ ), for all _s ∈S_ <sup>+</sup> _, a ∈A_ ( _s_ ). foreach _episode_ do Initialize S; foreach _step_ _of_ _episode_ do Choose _A_ from _S_ using policy derived from _Q_ (e.g., -greedy); Take action _A_, observe _R_, _S_ <sup>_′_</sup> ; _Q_ ( _S, A_ ) _←_ _Q_ ( _S, A_ ) + _α_ [ _R_ + _γ_ max _a Q_ ( _S_ <sup>_′_</sup> _, a_ ) _−_ _Q_ ( _S, A_ )]; _S_ _←_ _S_ <sup>_′_</sup> ; until S is terminal end foreach end foreach The pseudo code mentioned in the algorithm 1, the Qtable is initialized to all zeros indicating that the agent New _Q_ ( _s, a_ ) <u>�</u> <u>��</u> <u>�</u> New Q-Value = _Q_ ( _s, a_ ) - <u>��</u> <u>�</u> Current Q-Value + _α_ _R_ ( _s, a_ ) <u>����</u> Reward new state and all possible actions <u>�</u> <u>��</u> <u>�</u> ) + _γ_ max _Q_ <sup>_′_</sup> ( _s_ <sup>_′_</sup> _, a_ <sup>_′_</sup> ) _−Q_ ( _s, a_ ) + _γ_ Learning Discount doesn’t know anything about the world. Then as the episode begins, the agent performs an action from the given state currently it resides, and observe the next state with respective reward, the agent remains in the new state and repeat the process until a terminal state is reached. Instead of selecting actions based on the maximum future reward it selects an action at random. Acting randomly is important because it allows the agent to explore and discover new states that otherwise may not be selected during the exploitation process. DQN A core difference between Deep Q-Learning and QLearning is the implementation of the Q-table. DQN replaces the regular Q-table with a neural network. Rather than mapping a state-action pair to a Q-value, a neural network maps input states to (action, Q-value) pairs. One of the property of DQN is that the learning process uses 2 neural networks. These networks have the same architecture but different weights. After every fixed number of defined steps, the weights from the main network are copied to the target network, resulting towards more stability in the learning process. Both the main and target network maps input states to output actions. These output actions actually represent the model’s predicted Q-value. The action that has the largest predicted Q-value is the best known action at that state. After choosing an action, it’s time for the agent to perform the action and update the main and target networks according to the Bellman equation. Deep Q-Learning agents use Experience Replay to learn about their environment and update the main and target networks. The main network weights are then copied to the target network weights every fixed number of defined steps. Experience Replay is the act of storing and replaying game states (current state, action, reward, next state) that the RL algorithm is able to learn from. The use of Experience replay updates the parameters of the algorithm using saved and stored information from previously taken actions. It learns in small batches to avoid inaccurate dataset distribution of different states, actions, rewards, and next states that the neural network will see. Importantly, the agent doesn’t need to train after each step. From the pseudo code mentioned in algorithm 2, we first Initialize main and target neural networks, also an empty replay memory D. The agent selects and executes actions according to an Epsilon Greedy Strategy. The algorithm modifies standard Q-learning to make it suitable for training large neural networks without diverging. It uses experience replay in which we store the agent’s experiences at each time-step (current state, action, reward, next state) in a dataset, pooled over many episodes (where the end of an episode occurs when a terminal state is reached) into a replay memory. During the inner loop of the algorithm we apply mini batch updates to sample experiences, drawn at random from the pool of stored samples. DQN performs rollouts in an environment, collects data and then uses this data to train, by performing Stochastic gradient descent on the Mean Squared Error Loss of the predicted Q values for minimising the loss _L_ Every _C_ steps copy weights from _Q_ to _Q_ <sup>˜</sup> end if end while a given state. Slowly, after many iterations of training, both neural networks will approximate the optimal Q values. State-of-the-Art Currently there is a lot of research going on towards building hybrid solutions (Khan et al., 2019b,a) integrating Deep Learning with rule-based reasoning. In our current research we use rules discussed in Section1 to implement a Reinforcement learning based solutions taking into account Q-Learning and Deep Q-Learning. Q-learning was first proposed by Watkins in 1989 (Watkins and Dayan, 1992), since then it has become the popular option for reinforcement learning-based agents, however it is less effective for the complicated and high state space problem. Whereas, comparatively the use of DQN is more of a recent phenomena proposed by (Mnih et al., 2015) which is more effective for high state space problems. The extensions of DQN include double DQN (Van Hasselt et al., 2016), dueling DQN (Wang et al., 2016), deep recurrent Q-network (Hausknecht and Stone, 2015). RL has had extensive success in complex control environments like Atari games(Mnih et al., 2013), Sokoban <u>Algorithm</u> <u>2:</u> <u>DQN</u> <u>Algorithm</u> <u>(Mnih</u> <u>et</u> <u>al.,</u> <u>2015)</u> Initialize replay memory D to capacity N Initialize action-value function Q Initialize target action-value function _Q_ <sup>˜</sup> while _not_ _converged_ do Choose _A_ from _S_ using policy derived from _Q_ (e.g., -greedy); Agent takes action a, observes reward r, and next state _s_ <sup>_′_</sup> ; Store transition in the( _s_, _a_, _r_, _s_ <sup>_′_</sup>, _done_ ) in the experience replay memory _D_ if _enough_ _experiences_ _in_ _D_ then Sample a random _minibatch_ of _N_ transition from _D_ for _every_ _transition_ _(si,ai,ri,si,donei)_ _in_ _minibatch_ do if _donei_ then _yi_ = _ri_ else _yi_ = _ri_ + _γmaxa′∈AQ_ <sup>˜</sup> ( _s_ <sup>_′_</sup> _i_ _yi_ = _ri_ + _γmaxa′∈AQ_ <sup>˜</sup> ( _s_ <sup>_′_</sup> _i_ <sup>_, a′_</sup> <sup>)</sup> end if end for Calculate the loss _L_ = 1 _/N_ <sup>�</sup> _i_ <sup>_N_</sup> =0 <sup>_−_</sup> <sup>1</sup> _L_ = 1 _/N_ <sup>�</sup> _i_ <sup>_N_</sup> =0 <sup>_−_</sup> <sup>1(</sup> <sup>_Q_</sup> <sup>(</sup> <sup>_si, ai_</sup> <sup>)</sup> <sup>_−_</sup> <sup>_yi_</sup> <sup>)2</sup> Update _Q_ using the SGD algorithm by planning (Feng et al., 2020). It is also applied to games where there is real time strategy (RTS) such as bots (Wender and Watson, 2014), another reinforcement learning based approach (Amato and Shani, 2010) chooses from a set of predefined strategies in turn based strategy based games. In such approaches the training process is separated into several stages, each of them responsible for different aspects of the game (such as combat, movement and exploration). Other works in strategic fighting games (Graepel et al., 2004) map the possible states of the game based on low-level formations, such as distance between the fighters and health points. The reward function used are simple: a positive reward is granted every time the agent strikes the opponent and a negative reward is given when the agents gets hit. Moreover, Q-learning and DQN have been widely applied to dynamic treatment regimes (DTR) (Chakraborty and Moodie, 2013; Tsiatis et al., 2019), where the goal is to find sequential decision rules for individual patients that adapt to time-evolving illnesses. A very recent study (Gukov et al., 2021) introduced natural language processing into the study of knot theory, and they also utilize reinforcement learning (RL) based algorithms to find sequences of moves and braid relations that simplify knots and can identify unknots by explicitly giving the sequence of actions. Another study (Grannen et al., 2020) proposed HULK a perception-based system that untangles dense overhand and figure-eight knots in linear deformable objects from RGB observations. It exploits geometry at local and global scales and learns to model only task-specific features, instead of performing full state estimation, to enable fine-grained manipulation. Environment Settings To use the Q-Learning and DQN algorithms, it is necessary to setup the environment with which the agent interacts by performing certain actions while being in a specific state. We have used OpenAI Gym to setup the environment which focuses on the episodic setting of reinforcement learning, where the agent’s action chains are broken down into a sequence of episodes. Each episode begins by randomly sampling the agent’s initial state and continues until the environment reaches a terminal state. We experimented with different settings of the environment. For example, _reward_ _shaping_ which is an effective technique for incorporating domain knowledge into reinforcement learning (RL) algorithms. Using reward shaping the system would like to accumulate positive rewards as much as possible, whereas negative rewards encourage to reach a terminal state as quickly as possible to avoid accumulating penalties. The rewards mentioned in the table 1, table 2 are of the type reward shaping. In the second setting, we explored _reward_ _propagation_ . In this setting, rewards are assigned at the end of episode, e.g. as the game is played between the two agents, a positive reward is associated to the final move for the agent which wins the game, and a negative reward for the agents final move that loses the game. In the final setting, we experimented with hybrid approach reward shaping and propagation, where agent1 is trained using reward shaping and agent2 using reward propagation. <u>Action</u> <u>Reward</u> <u>CARET</u> <u>MOVE</u> <u>0</u> <u>ROTATE</u> <u>TRUE</u> <u>0</u> <u>ROTATE</u> <u>FALSE</u> <u>0</u> <u>REPLACE</u> <u>TRUE</u> <u>1</u> <u>REPLACE</u> <u>BACK</u> <u>-1</u> <u>REPLACE</u> <u>FALSE</u> <u>-1</u> <u>ROTATE</u> <u>REPLACE</u> <u>0</u> Table 1: Reward associated for each action for agent2 <u>Action</u> <u>Reward</u> <u>CARET</u> <u>MOVE</u> <u>0</u> <u>ROTATE</u> <u>TRUE</u> <u>0</u> <u>ROTATE</u> <u>FALSE</u> <u>0</u> <u>REPLACE</u> <u>TRUE</u> <u>-1</u> <u>REPLACE</u> <u>BACK</u> <u>1</u> <u>REPLACE</u> <u>FALSE</u> <u>-1</u> <u>ROTATE</u> <u>REPLACE</u> <u>0</u> Table 2: Reward associated for each action for agent1 In this paper, we present results of the reward shaping, as they were more encouraging as compare to the other two settings we discussed. Inside the environment for our use-case; we use caret of a fixed length 5 which moves back and forth over the string. The length of the caret represents a sub-string, where the sub-string represents the state of the agents. The caret moves over five characters at a time in the whole string and the five characters inside the string would represent the state of the agent. It is not feasible to consider the whole string, as for each character of the string, there are 5 options: [’a’, ’A’, ’b’, ’B’, ’1’]. This setting would result in large state-space representation, and not feasible for Q-learning problem, as Q-table is constructed for each state-action pair. Actions and Rewards The table 1, shows the rewards associated with each action for braids with 3 strands for the untangling agent, whereas, table 2 shows the reward associated for each action of the tangling agent. As we have already discussed all such actions that bring us closer to the target output value will have the higher rewards and all such actions which takes us away from the target output will have lesser rewards. The following actions does the following, _action_ _replace_, replaces ( _Aa_ to 11, _aA_ to 11, _Bb_ to 11, _bB_ to 11), _action_ _replace_ _<u>back</u>_ replaces (11 to _Aa_, 11 to _aA_, 11 to _Bb_, 11 to _bB_ ), _action_ _rotate_ _<u>replace</u>_ moves the position of the strings ( _ABA_ to _BAB_, _BAB_ to _ABA_ ), _action_ _rotate_ moves the position of the strings ( _aA_ to _Aa_, _aA_ to _Aa_, _bB_ to _Bb_, _Bb_ to _bB_ ). The choice of the reward selection is inspired from few of the works recently published (Gawłowicz and Zubow, 2018; Mendonc¸a et al., 2015). Experiments and Results All the experiments were performed in a system with Nvidia Geforce GTX 1080Ti with 3584 cores running at ep=10000 <u>steps=20</u> ep=1000 <u>steps=100</u> 1583 MHz frequency on 11GB onboard GDDR5X memory. We have used CUDA version 10.2 to compile the code. The code was implemented in python using gym library. To measure the performance, we utilize the metrics provided by OpenAI Gym interface, namely _rewards_ _over_ _episodes_ of a particular environment. In each episode there are two players (player1 = tangling player, player2= un-tangling) the first player starts with a fixed length of the input tries to tangle the braid during the fixed number of defined steps applying the transformations discussed in Section 1, that tangled state is the input for the second player which again applies the same transformations to un-tangle the braid. To implement the Q-Learning algorithm the idea is to find the optimal action-selection policy using a Q function. Our goal is to maximize the value function Q. The Q-table helps us to find the best action for each state. It helps us to maximize the expected reward by selecting the best of all possible actions. Q(state, action) returns the expected future reward of that action at that state. This function can be estimated using Q-Learning, which iteratively updates Q(s,a) using the Bellman equation. Initially the agents explore the environment and update the Q-Table, over the period of time agents will start to exploit the environment and start taking better actions. We ran the experiments for the braid length from 7 to 11 to observe the results for 1000 and 10000 episodes respectively. The choice of hyperparameters selection was looked from some of the work in the literature (Gelana Tostaeva, 2020). To implement the DQN algorithm we use the pyTorch library, it is an open source machine learning library. The idea behind the DQN algorithm is to use function approximators (i.e. Neural Networks) in order to approximate the action-values _Q-values_ for any given state. The DQN algorithm has 2 such networks: One is the _train_ _network_ (i.e. the one that is being trained), and the other one is the _target_ _network_, which is what the _train_ _network_ is trying to approximate. By using the bellman equation, we approximate Q(s, a) with the _train_ _network_ and Q (s’, a’) with the _target_ _network_ . This is essentially what DQN does: It performs rollouts in an environment, collects data and then uses this data to train, by performing gradient descent on the Mean Squared Error Loss of the predicted Q values for a given state and the same values but by substituting Q(s, a) (for the action ‘a‘ that was taken) with the bellman equation value. These training iterations take place every fixed number of episodes e.g. in the current case after (n=100) episodes, and after those the _target_ _network_ copies the weights of the _train network_ . Slowly, after many iterations of training, both neural networks approximate the optimal Q values. During evaluation, for any given state, the algorithm will pick the action that corresponds to the highest Q value, and this is how the agent interacts with the environment. DQN uses the replay buffer, the replay buffer is filled at each step during training in an episode. For example, if the maximum number of steps in an episode are 20, and agent trains every 100 episodes, data stored in the replay buffer will be 100 *20 = 2000. To balance exploration and exploitation, we are using the epsilon-greedy strategy. We first promote full exploration Table 4: probability of player2 of winning the game, ep=episodes using DQN by setting epsilon =1 and update it after each episode to slowly decrease it to 0.05. We ran the experiments for the braid length from 7 to 11 to observe the results for 1000 and 10000 episodes respectively. In order to evaluate the performance of the RL agents, we run them on braids with different lengths. It is observed from Table 3 and 4, for lesser number of training episodes and larger length of the input the probability of the tangling player to win the game is more, whereas when we train the system for higher number of episodes the probability of the un-tangling player to win the game is more times at the end of training. Looking at the respective tables 3 and 4, it can be observed the untangling player for QLearning performs better with lesser number of episodes and lesser number of maximum defined steps, on the other hand with 10000 episodes and maximum number of steps e.g., 100 the performance of DQN agent is more stable and better then as compared to the Q-learning agent. To sum up Untangling player for Q-learning agent performs better when dealing with lesser number maximum defined steps agent can take to perform transforms, whereas the performance of DQN agent becomes more stable while dealing with higher number of episodes and more steps agent can take to untangle the braids. Conclusion In this study the main focus is the comparison of the results using Q-Learning and DQN for the problem of untangling of braids. The problem of untangling of braids was approached as a competitive game between two players, where the tangling agent starts with a fixed length of input and applies certain rules to tangle the braid, that tangled braid is the input for the untangling agent which again applies the rules to untangle the braid, ultimately if second agent successfully untangles the braid it wins the round or vice versa. We observe the more we train the model, the more is the probability of the second agent to win the game. The results shows the performance of ep=1000 Input length <u>steps=20</u> ep=1000 ep=10000 ep=1000 ep=10000 Input length <u>steps=20</u> <u>steps=20</u> <u>steps=100</u> <u>steps=100</u> <u>7</u> <u>44.3%</u> <u>71.9%</u> <u>60.8</u> <u>%</u> <u>78.6%</u> <u>8</u> <u>32.1%</u> <u>65.2%</u> <u>35.6%</u> <u>71.7%</u> <u>9</u> <u>32.3%</u> <u>57.2%</u> <u>33.7%</u> <u>58%</u> <u>10</u> <u>25%</u> <u>58.1%</u> <u>21.9%</u> <u>50.9%</u> <u>11</u> <u>25.2%</u> <u>55%</u> <u>26.9%</u> <u>47.9%</u> Table 3: probability of player2 of winning the game, ep=episodes using Q-Learning ep=1000 Input length <u>steps=20</u> ep=1000 ep=10000 ep=1000 ep=10000 Input length <u>steps=20</u> <u>steps=20</u> <u>steps=100</u> <u>steps=100</u> <u>7</u> <u>18.9%</u> <u>75.4%</u> <u>36.9%</u> <u>81%</u> <u>8</u> <u>15.6%</u> <u>60.27%</u> <u>26%</u> <u>78.4%</u> <u>9</u> <u>10.6%</u> <u>74.2%</u> <u>19.7%</u> <u>79.7%</u> <u>10</u> <u>10.%</u> <u>61.9%</u> <u>13.6%</u> <u>77.1%</u> <u>11</u> <u>9.5%</u> <u>54.5%</u> <u>11.9%</u> <u>75.9%</u> ep=10000 <u>steps=20</u> ep=1000 <u>steps=100</u> Q-Learning is slightly better when compared with DQN for the untangling of braids. In the future we would like to do a more comprehensive comparative analysis of other RL based approaches (Proximal Policy Optimization (PPO), Asynchronous Advantage Actor Critic (A3C), Trust Region Policy Optimization (TRPO)) with the mentioned approaches in this paper. References C. Amato and G. Shani. High-level reinforcement learning in strategy games. In _AAMAS_, volume 10, pages 75–82, 2010. G. Brockman, V. Cheung, L. Pettersson, J. Schneider, J. Schulman, J. Tang, and W. Zaremba. Openai gym. _arXiv_ _preprint_ _arXiv:1606.01540_, 2016. N. Brown and T. Sandholm. Superhuman ai for multiplayer poker. _Science_, 365(6456):885–890, 2019. B. Chakraborty and E. Moodie. _Statistical_ _methods_ _for_ _dynamic_ _treatment_ _regimes_, volume 2. Springer, 2013. D. Feng, C. P. Gomes, and B. Selman. Solving hard ai A. Khan, A. Vernitski, and A. Lisitsa. Untangling braids with multi-agent q-learning. _arXiv_ _preprint_ _arXiv:2109.14502_, 2021. M. R. Mendonc¸a, H. S. Bernardino, and R. F. Neto. Simulating human behavior in fighting games using reinforcement learning and artificial neural networks. In _2015_ _14th_ _Brazilian_ _symposium_ _on_ _computer_ _games_ _and_ _digital_ _entertainment_ _(SBGames)_, pages 152–159. IEEE, 2015. V. Mnih, K. Kavukcuoglu, D. Silver, A. Graves, I. Antonoglou, D. Wierstra, and M. Riedmiller. Playing atari with deep reinforcement learning. _arXiv_ _preprint_ _arXiv:1312.5602_, 2013. V. Mnih, K. Kavukcuoglu, D. Silver, A. A. Rusu, J. Veness, M. G. Bellemare, A. Graves, M. Riedmiller, A. K. Fidjeland, G. Ostrovski, et al. Human-level control through deep reinforcement learning. _nature_, 518(7540): 529–533, 2015. S. Shalev-Shwartz, S. Shammah, and A. Shashua. Safe, multi-agent, reinforcement learning for autonomous driving. _arXiv_ _preprint_ _arXiv:1610.03295_, 2016. ing. planning instances using curriculum-driven deep reinforcement learning. _arXiv_ _preprint_ _arXiv:2006.02689_, D. Silver, 2020. A. Huang, A. Bolton, P. Gawłowicz and A. Zubow. ns3-gym: Extending ope human nai gym for networking research. _arXiv_ _preprint_ _arXiv:1810.03943_, 2018. R. S. Sutton _introduction_ Gelana Tostaeva. Introduction to q-learning with openai gym. A. A. https://medium.com/swlh/introduction-to-q-learningLaber. -with-openai-gym-2d794da10f3d, April 2020. _for_ T. Graepel, R. Herbrich, and J. Gold. Learning to fight. D. Silver, J. Schrittwieser, K. Simonyan, I. Antonoglou, A. Huang, A. Guez, T. Hubert, L. Baker, M. Lai, A. Bolton, et al. Mastering the game of go without human knowledge. _nature_, 550(7676):354–359, 2017. R. S. Sutton and A. G. Barto. _Reinforcement_ _learning:_ _An_ _introduction_ . MIT press, 2018. A. A. Tsiatis, M. Davidian, S. T. Holloway, and E. B. Laber. _Dynamic_ _Treatment_ _Regimes:_ _Statistical_ _Methods_ _for_ _Precision_ _Medicine_ . CRC press, 2019. In _Proceedings of the International Conference on Com-_ _puter_ _Games:_ _Artificial_ _Intelligence,_ _Design_ _and_ _Educa-_ _tion_, pages 193–200. Citeseer, 2004. J. Grannen, P. Sundaresan, B. Thananjeyan, J. Ichnowski, A. Balakrishna, V. Viswanath, M. Laskey, J. E. Gonzalez, and K. Goldberg. Learning robot policies for untangling dense knots in linear deformable structures. In _Confer-_ _ence_ _on_ _Robot_ _Learning_ _(CoRL)_, 2020. S. Gukov, J. Halverson, F. Ruehle, and P. Sułkowski. Learning to unknot. _Machine_ _Learning:_ _Science_ _and_ _Technology_, 2(2):025035, 2021. M. Hausknecht and P. Stone. Deep recurrent q-learning for partially observable mdps. In _2015_ _aaai_ _fall_ _symposium_ _series_, 2015. L. P. Kaelbling, M. L. Littman, and A. W. Moore. Re inforcement learning: A survey. _Journal_ _of_ _artificial_ _intelligence_ _research_, 4:237–285, 1996. A. Khan, L. Bozzato, L. Serafini, and B. Lazzerini. Visual reasoning on complex events in soccer videos using answer set programming. In _GCAI_, pages 42–53, 2019a. A. Khan, L. Serafini, L. Bozzato, and B. Lazzerini. Event detection from video using answer set programing. In _CILC_, pages 48–58, 2019b. H. Van Hasselt, A. Guez, and D. Silver. Deep reinforcement learning with double q-learning. In _Proceedings_ _of_ _the_ _AAAI_ _conference_ _on_ _artificial_ _intelligence_, volume 30, 2016. Z. Wang, T. Schaul, M. Hessel, H. Hasselt, M. Lanctot, and N. Freitas. Dueling network architectures for deep reinforcement learning. In _International_ _conference_ _on_ _machine_ _learning_, pages 1995–2003. PMLR, 2016. C. J. Watkins and P. Dayan. Q-learning. _Machine learning_, 8(3-4):279–292, 1992. S. Wender and I. Watson. Combining case-based reasoning and reinforcement learning for unit navigation in realtime strategy game ai. In _International_ _Conference_ _on_ _Case-Based_ _Reasoning_, pages 511–525. Springer, 2014.

섹션 본문 33문단 · 23,425자

(제목 없음)

1We use reinforcement learning algorithms (Q-Learning and Deep Q-Learning) to tackle the problem of untangling braids and to compare the results of both algorithms. The idea is to use multi-agent (two competing players) based approach to tackle the problem of untangling braids. We interface the braid untangling problem with the OpenAI Gym environment, a widely used way of connecting agents to reinforcement learning problems. The results provide evidence that the more we train the system, the better the untangling player gets for both approaches at untangling braids. The comparison of both approaches produces interesting results, where Q-learning performs better while dealing with braids of shorter length, whereas DQN performs slightly better while dealing with braids of longer length.

Introduction

2Braids are mathematical objects from low-dimensional topology which can be successfully encoded with sequences of letters and, therefore, studied using algebra or, as we do in this study, using some computer-scientific approach. A braid on n strands consists of n ropes whose left-hand ends are fixed one under another and whose righthand ends are fixed one under another; you can imagine that the braid is laid out on a table, and the ends of the ropes are attached to the table with nails. Figures 1, 2, 3 show examples of braids on 3 strands.

Figure 1: Braid aabaBBAB

3Few of the interesting application of braids, e.g., in the field of biology they can be used to examine the ability of enzymes to add or remove tangles from DNA; in chemistry, they allow us to describe the structure of topological stereoisomers, or molecules with the same atoms but different configurations; whereas in physics, graphs used in braids to create interesting models for examining the way in Copyright © 2021by the authors. All rights reserved. which particles interact. In the context of the current study, untangling braids with reinforcement learning is important as a step towards using reinforcement learning to solve a more general mathematical problem known as the word problem in groups; making progress in this direction is generally useful for training computers to prove theorems and conduct mathematical research.

4Two braids are equivalent to one another if they can be transformed into one another by shifting and twisting the middle parts of the ropes (without touching the ends of the ropes). For example, the two braids in Figures 1, 2 are equivalent to one another, although it is difficult to see it.

5They are also what is called trivial braids, in the sense that they are equivalent to the braid without any intersections of ropes, shown in Figure 3. Now let us explain how braids can be represented conveniently in the computer. A braid is considered as a sequence of its simple fragments; for braids on 3 strands, these are the fragments shown in Figure 4, which we denote by A, a, B, b, 1 (and which in mathematical papers are usually denoted by σ 1 , σ −1 1 , σ 2 , σ −1 2 , 1). Using this convenient notation, we can now say that the braids in Figures 1, 2 are aabaBBAB and baBABaBb. This notation is useful not only for describing braids, but also for checking if two braids are equivalent. Indeed, it is known that two braids are equivalent if and only if one can be transformed to the other using rules called the second Reidemeister move and the third Reidemeister move. The second Reidemeister move is the rule stating that Aa and aA are equivalent to 11, and Bb and bB are also equivalent to 11. (An algebraist studying braids in the context of group theory would also add that 11 is equivalent to 1; however, we felt that the performance of our AI will be best if we omit this non-essential rule). The third Reidemeister move is the rule stating that ABA is equivalent to BAB. A recent study (Gukov et al., 2021) uses RL to untangle knots using a version of Reidemeister moves known as Markov moves. The novelty of our approach is the use two agents: one for tangling and one for untangling.

6Recent success of reinforcement learning (RL) in many interesting problems, such as playing the game of Go (Silver et al., 2017), playing card games (Brown and Sandholm, 2019), and autonomous driving (Shalev-Shwartz et al., 2016) mostly involve the participation of more than one single agent/player, and such problems are modeled as multi-agent RL (MARL) problems. MARL addresses the autonomous agents that operate in a common environment, each of which aims to optimize its own long term return by interacting with the environment. Multi-agent systems can be placed in different groups e.g., cooperative, competitive depending on the types of settings. In particular, in the cooperative setting, agents collaborate to optimize a common long-term return; while in the competitive setting, they have opposite goals with reward of one agent is the loss of the other.

7We experimented with braids with three strands using (Q-Learning and Deep Q-Learning), where following transformations are allowed, Aa=aA=11; Bb=bB=11; A1=1A; a1=1a; B1=1B; b1=1b, ABA=BAB. We approach the problem of untangling braids on 3 strands as a game played between two players, player 1 (the tangling player) and player 2 (the untangling player). Player 1 starts with an untangled braid as in Figure 3 with specific length of the input and applies Reidemeister moves to tangle the braid. For example, braids in Figures 1, 2 were produced by player 1 after approximately 150 games against player 2. Once player 1 has created a tangled braid after a fixed number of steps, that would be the input for the player 2 (untangling player); the task of player 2 is to apply Reidemeister moves to reach a fixed target output, that would be all 1's (untangled state). We use OpenAI Gym (Brockman et al., 2016) an interface which provides a number of environments to implement reinforcement learning problems. The benefit of interfacing with OpenAI Gym is that it is an actively developed interface which allows to add environments and features useful while training the model. The paper is organized as follows: in the following sec-tion we discuss the Background taking into consideration basics towards Q-Learning and Deep Q-Learning, state-ofthe-art, setting up the environment to actions and rewards.

8In Section 3, we mention about the experimental details and results.

Background

9In this section, we formally highlight the important concepts for the understanding and development of the project, and also highlight some of the relevant work in the domain of reinforcement learning specifically for games. Reinforcement learning is the training of machine learning models to make a sequence of decisions, where the agent learns to achieve a goal in an uncertain, potentially complex environment (Kaelbling et al., 1996). In RL, there is a gamelike situation, where the computer employs trial and error to come up with a solution to the problem. Basically, during the whole learning process, the agent gets either rewards or penalties for the actions it performs. The overall goal is to maximize the total rewards.

Q-Learning

10New Q(s, a)

11Reward +γ Maximum predicted reward, given new state and all possible actions

12Learning rate

Discount rate

13As discussed in our previous work (Khan et al., 2021), Q-learning makes use of the Bellman equation. Where the first term, Q(s, a) is the value of the current action in the current state, alpha is the learning rate that controls how much the difference between previous and new Q-value is considered. Gamma is a discount factor, which is used to balance between immediate and future reward. The updates occur after each step or action, and ends when an episode is done (reaching the terminal point). The agent will not learn much after initial episodes, but eventually with enough exploring (steps and episodes) it will converge and learn the optimal Q-values.

14Algorithm 1: Q-learning (Sutton and Barto, 2018) Initialize Q(s, a), for all s ∈ S + , a ∈ A(s). foreach episode do Initialize S; foreach step of episode do Choose A from S using policy derived from Q (e.g., -greedy); Take action A, observe R, S ′ ;

15The pseudo code mentioned in the algorithm 1, the Qtable is initialized to all zeros indicating that the agent doesn't know anything about the world. Then as the episode begins, the agent performs an action from the given state currently it resides, and observe the next state with respective reward, the agent remains in the new state and repeat the process until a terminal state is reached. Instead of selecting actions based on the maximum future reward it selects an action at random. Acting randomly is important because it allows the agent to explore and discover new states that otherwise may not be selected during the exploitation process.

DQN

16A core difference between Deep Q-Learning and Q-Learning is the implementation of the Q-table. DQN replaces the regular Q-table with a neural network. Rather than mapping a state-action pair to a Q-value, a neural network maps input states to (action, Q-value) pairs.

17One of the property of DQN is that the learning process uses 2 neural networks. These networks have the same architecture but different weights. After every fixed number of defined steps, the weights from the main network are copied to the target network, resulting towards more stability in the learning process. Both the main and target network maps input states to output actions. These output actions actually represent the model's predicted Q-value. The action that has the largest predicted Q-value is the best known action at that state.

18After choosing an action, it's time for the agent to perform the action and update the main and target networks according to the Bellman equation. Deep Q-Learning agents use Experience Replay to learn about their environment and update the main and target networks. The main network weights are then copied to the target network weights every fixed number of defined steps.

19Experience Replay is the act of storing and replaying game states (current state, action, reward, next state) that the RL algorithm is able to learn from. The use of Experience replay updates the parameters of the algorithm using saved and stored information from previously taken actions. It learns in small batches to avoid inaccurate dataset distribution of different states, actions, rewards, and next states that the neural network will see. Importantly, the agent doesn't need to train after each step.

20From the pseudo code mentioned in algorithm 2, we first Initialize main and target neural networks, also an empty replay memory D. The agent selects and executes actions according to an Epsilon Greedy Strategy. The algorithm modifies standard Q-learning to make it suitable for training large neural networks without diverging. It uses experience replay in which we store the agent's experiences at each time-step (current state, action, reward, next state) in a dataset, pooled over many episodes (where the end of an episode occurs when a terminal state is reached) into a replay memory. During the inner loop of the algorithm we apply mini batch updates to sample experiences, drawn at random from the pool of stored samples. DQN performs rollouts in an environment, collects data and then uses this data to train, by performing Stochastic gradient descent on the Mean Squared Error Loss of the predicted Q values for Algorithm 2: DQN Algorithm (Mnih et al., 2015) Initialize replay memory D to capacity N Initialize action-value function Q Initialize target action-value functionQ while not converged do

21Choose A from S using policy derived from Q (e.g., -greedy); Agent takes action a, observes reward r, and next state s ′ ; Store transition in the(s,a,r,s ′ ,done) in the experience replay memory D if enough experiences in D then Sample a random minibatch of N transition from D for every transition (s

22Update Q using the SGD algorithm by minimising the loss L Every C steps copy weights from Q toQ end if end while a given state. Slowly, after many iterations of training, both neural networks will approximate the optimal Q values.

State-of-the-Art

23Currently there is a lot of research going on towards building hybrid solutions (Khan et al., 2019b,a) integrating Deep Learning with rule-based reasoning. In our current research we use rules discussed in Section1 to implement a Reinforcement learning based solutions taking into account Q-Learning and Deep Q-Learning.

24Q-learning was first proposed by Watkins in 1989 (Watkins andDayan, 1992), since then it has become the popular option for reinforcement learning-based agents, however it is less effective for the complicated and high state space problem. Whereas, comparatively the use of DQN is more of a recent phenomena proposed by (Mnih et al., 2015) which is more effective for high state space problems. The extensions of DQN include double DQN (Van Hasselt et al., 2016), dueling DQN (Wang et al., 2016), deep recurrent Q-network (Hausknecht and Stone, 2015). RL has had extensive success in complex control environments like Atari games (Mnih et al., 2013), Sokoban planning (Feng et al., 2020). It is also applied to games where there is real time strategy (RTS) such as bots (Wender and Watson, 2014), another reinforcement learning based approach (Amato and Shani, 2010) chooses from a set of predefined strategies in turn based strategy based games. In such approaches the training process is separated into several stages, each of them responsible for different aspects of the game (such as combat, movement and exploration). Other works in strategic fighting games (Graepel et al., 2004) map the possible states of the game based on low-level formations, such as distance between the fighters and health points. The reward function used are simple: a positive reward is granted every time the agent strikes the opponent and a negative reward is given when the agents gets hit. Moreover, Q-learning and DQN have been widely applied to dynamic treatment regimes (DTR) (Chakraborty and Moodie, 2013;Tsiatis et al., 2019), where the goal is to find sequential decision rules for individual patients that adapt to time-evolving illnesses.

25A very recent study (Gukov et al., 2021) introduced natural language processing into the study of knot theory, and they also utilize reinforcement learning (RL) based algorithms to find sequences of moves and braid relations that simplify knots and can identify unknots by explicitly giving the sequence of actions. Another study (Grannen et al., 2020) proposed HULK a perception-based system that untangles dense overhand and figure-eight knots in linear deformable objects from RGB observations. It exploits geometry at local and global scales and learns to model only task-specific features, instead of performing full state estimation, to enable fine-grained manipulation.

Environment Settings

26To use the Q-Learning and DQN algorithms, it is necessary to setup the environment with which the agent interacts by performing certain actions while being in a specific state. We have used OpenAI Gym to setup the environment which focuses on the episodic setting of reinforcement learning, where the agent's action chains are broken down into a sequence of episodes. Each episode begins by randomly sampling the agent's initial state and continues until the environment reaches a terminal state. We experimented with different settings of the environment. For example, reward shaping which is an effective technique for incorporating domain knowledge into reinforcement learning (RL) algorithms. Using reward shaping the system would like to accumulate positive rewards as much as possible, whereas negative rewards encourage to reach a terminal state as quickly as possible to avoid accumulating penalties. The rewards mentioned in the table 1, table 2 are of the type reward shaping. In the second setting, we explored reward propagation. In this setting, rewards are assigned at the end of episode, e.g. as the game is played between the two agents, a positive reward is associated to the final move for the agent which wins the game, and a negative reward for the agents final move that loses the game. In the final setting, we experimented with hybrid approach reward shaping and propagation, where agent1 is trained using reward shaping and agent2 using reward propagation. In this paper, we present results of the reward shaping, as they were more encouraging as compare to the other two settings we discussed.

27Inside the environment for our use-case; we use caret of a fixed length 5 which moves back and forth over the string. The length of the caret represents a sub-string, where the sub-string represents the state of the agents. The caret moves over five characters at a time in the whole string and the five characters inside the string would represent the state of the agent. It is not feasible to consider the whole string, as for each character of the string, there are 5 options: ['a', 'A', 'b', 'B', '1']. This setting would result in large state-space representation, and not feasible for Q-learning problem, as Q-table is constructed for each state-action pair.

Actions and Rewards

28The table 1, shows the rewards associated with each action for braids with 3 strands for the untangling agent, whereas, table 2 shows the reward associated for each action of the tangling agent. As we have already discussed all such actions that bring us closer to the target output value will have the higher rewards and all such actions which takes us away from the target output will have lesser rewards.

29The following actions does the following, action replace, replaces (Aa to 11, aA to 11, Bb to 11, bB to 11), action replace back replaces (11 to Aa, 11 to aA, 11 to Bb, 11 to bB), action rotate replace moves the position of the strings (ABA to BAB, BAB to ABA), action rotate moves the position of the strings (aA to Aa, aA to Aa, bB to Bb, Bb to bB). The choice of the reward selection is inspired from few of the works recently published (Gawłowicz and Zubow, 2018;Mendonça et al., 2015).

Experiments and Results

30All the experiments were performed in a system with Nvidia Geforce GTX 1080Ti with 3584 cores running at We have used CUDA version 10.2 to compile the code. The code was implemented in python using gym library. To measure the performance, we utilize the metrics provided by OpenAI Gym interface, namely rewards over episodes of a particular environment. In each episode there are two players (player1 = tangling player, player2= un-tangling) the first player starts with a fixed length of the input tries to tangle the braid during the fixed number of defined steps applying the transformations discussed in Section 1, that tangled state is the input for the second player which again applies the same transformations to un-tangle the braid.

31To implement the Q-Learning algorithm the idea is to find the optimal action-selection policy using a Q function. Our goal is to maximize the value function Q. The Q-table helps us to find the best action for each state. It helps us to maximize the expected reward by selecting the best of all possible actions. Q(state, action) returns the expected future reward of that action at that state. This function can be estimated using Q-Learning, which iteratively updates Q(s,a) using the Bellman equation. Initially the agents explore the environment and update the Q- Table, over the period of time agents will start to exploit the environment and start taking better actions. We ran the experiments for the braid length from 7 to 11 to observe the results for 1000 and 10000 episodes respectively. The choice of hyperparameters selection was looked from some of the work in the literature (Gelana Tostaeva, 2020).

32To implement the DQN algorithm we use the pyTorch library, it is an open source machine learning library. The idea behind the DQN algorithm is to use function approximators (i.e. Neural Networks) in order to approximate the action-values Q-values for any given state. The DQN algorithm has 2 such networks: One is the train network (i.e. the one that is being trained), and the other one is the target network, which is what the train network is trying to approximate. By using the bellman equation, we approximate Q(s, a) with the train network and Q (s', a') with the target network. This is essentially what DQN does: It performs rollouts in an environment, collects data and then uses this data to train, by performing gradient descent on the Mean Squared Error Loss of the predicted Q values for a given state and the same values but by substituting Q(s, a) (for the action 'a' that was taken) with the bellman equation value. These training iterations take place every fixed number of episodes e.g. in the current case after (n=100) episodes, and after those the target network copies the weights of the train network. Slowly, after many iterations of training, both neural networks approximate the optimal Q values. During evaluation, for any given state, the algorithm will pick the action that corresponds to the highest Q value, and this is how the agent interacts with the environment. DQN uses the replay buffer, the replay buffer is filled at each step during training in an episode. For example, if the maximum number of steps in an episode are 20, and agent trains every 100 episodes, data stored in the replay buffer will be 100 *20 = 2000. To balance exploration and exploitation, we are using the epsilon-greedy strategy. We first promote full exploration Table 4: probability of player2 of winning the game, ep=episodes using DQN by setting epsilon =1 and update it after each episode to slowly decrease it to 0.05. We ran the experiments for the braid length from 7 to 11 to observe the results for 1000 and 10000 episodes respectively. In order to evaluate the performance of the RL agents, we run them on braids with different lengths. It is observed from Table 3 and 4, for lesser number of training episodes and larger length of the input the probability of the tangling player to win the game is more, whereas when we train the system for higher number of episodes the probability of the un-tangling player to win the game is more times at the end of training. Looking at the respective tables 3 and 4, it can be observed the untangling player for Q-Learning performs better with lesser number of episodes and lesser number of maximum defined steps, on the other hand with 10000 episodes and maximum number of steps e.g., 100 the performance of DQN agent is more stable and better then as compared to the Q-learning agent. To sum up Untangling player for Q-learning agent performs better when dealing with lesser number maximum defined steps agent can take to perform transforms, whereas the performance of DQN agent becomes more stable while dealing with higher number of episodes and more steps agent can take to untangle the braids.

Conclusion

33In this study the main focus is the comparison of the results using Q-Learning and DQN for the problem of untangling of braids. The problem of untangling of braids was approached as a competitive game between two players, where the tangling agent starts with a fixed length of input and applies certain rules to tangle the braid, that tangled braid is the input for the untangling agent which again applies the rules to untangle the braid, ultimately if second agent successfully untangles the braid it wins the round or vice versa. We observe the more we train the model, the more is the probability of the second agent to win the game. The results shows the performance of

참고문헌 21건

  1. High-level reinforcement learning in strategy games Adaptive Agents and Multi-Agents Systems · 2010 10.5555/1838206.1838217
  2. Reinforcement Learning: A Survey Journal of Artificial Intelligence Research · AI Access Foundation · 1996 10.1613/jair.301
  3. Deep Recurrent Q-Learning for Partially Observable MDPs arXiv (Cornell University) · Cornell University · 2015
  4. Human-level control through deep reinforcement learning Nature · Nature Portfolio · 2015 10.1038/nature14236
  5. Statistical Methods for Dynamic Treatment Regimes Statistics in the health sciences · Springer Nature · 2013 10.1007/978-1-4614-7428-9
  6. Simulating Human Behavior in Fighting Games Using Reinforcement Learning and Artificial Neural Networks 2015 10.1109/sbgames.2015.25
  7. Deep Reinforcement Learning with Double Q-Learning Proceedings of the AAAI Conference on Artificial Intelligence · Association for the Advancement of Artificial Intelligence · 2016 10.1609/aaai.v30i1.10295
  8. Mastering the game of Go without human knowledge Nature · Nature Portfolio · 2017 10.1038/nature24270
  9. Combining Case-Based Reasoning and Reinforcement Learning for Unit Navigation in Real-Time Strategy Game AI Lecture notes in computer science · Springer Science+Business Media · 2014 10.1007/978-3-319-11209-1_36
  10. ns3-gym: Extending OpenAI Gym for Networking Research arXiv (Cornell University) · Cornell University · 2018 10.48550/arxiv.1810.03943
  11. Dueling Network Architectures for Deep Reinforcement Learning arXiv (Cornell University) · Cornell University · 2015 10.48550/arxiv.1511.06581
  12. Superhuman AI for multiplayer poker Science · American Association for the Advancement of Science · 2019 10.1126/science.aay2400
  13. Event Detection from Video Using Answer Set Programing. CILC · 2019
  14. Visual Reasoning on Complex Events in Soccer Videos Using Answer Set Programming EPiC series in computing · 2019 10.29007/pjd4
  15. Dynamic Treatment Regimes: Statistical Methods for Precision Medicine 2019
  16. Solving Hard AI Planning Instances Using Curriculum-Driven Deep Reinforcement Learning 2020 10.24963/ijcai.2020/304
  17. Reinforcement Learning: An Introduction Neurocomputing · Elsevier BV · 2000 10.1016/s0925-2312(00)00324-6
  18. Untangling Braids with Multi-Agent Q-Learning 2021 10.1109/synasc54541.2021.00032
  19. Playing Atari with Deep Reinforcement Learning arXiv (Cornell University) · Cornell University · 2013 10.48550/arxiv.1312.5602
  20. Safe, Multi-Agent, Reinforcement Learning for Autonomous Driving arXiv (Cornell University) · Cornell University · 2016 10.48550/arxiv.1610.03295
  21. OpenAI Gym arXiv (Cornell University) · Cornell University · 2016 10.48550/arxiv.1606.01540