## 1 Introduction  
As the age of patients increases, so do the chances of them suffering disabilities. Patients who have suffered from stroke, spinal cord injury (SCI), or brain trauma usually develop a disability that affects motor function. SCIs can be physically and emotionally damaging for the patient and treatment can cost up to USD 4.6 million [1]. Neuromotor deficits are also present in patients with cerebral palsy (CP), a medical condition that can impair the patient's abilities to walk or keep their balance [2]. To help CP patients regain motor function, muscle training and exercises such as constraint-induced movement therapy have been used to improve the function of the affected limb [3; 4; 5]. However, there is speculation about whether the patient is regaining control of their limb, or the patient is using an unnatural movement to compensate for the loss of motor control [5]. This has led to an increase in research dedicated to developing rehabilitation methods to help patients regain motor control. Gait training is a rehabilitation strategy to help patients regain motor control in their lower extremities by facilitating exercises mimicking a natural walking pattern. Recent advancements in technology have inspired biomedical research to improve gait-training effectiveness to help the patient make a full recovery. One such solution is the use of powered robotic exoskeletons to aid the patients in the gait-training exercises. For example, one study used a lower-limb exoskeleton to assist in the knee extension of CP patients with crouch gait [6]. Some studies have been made to test the safety and feasibility of exoskeletal devices to treat patients suffering from complete and incomplete SCI and how this treatment affects their gait [7]. For instance, the Ekso mobile exoskeleton demonstrated an improvement in gait function for SCI patients; however, the donning and dofing of the exoskeleton is a challenge for the patients [8]. Research conducted at the University of Texas at Tyler involves designing and developing a device called RoboREHAB, a multi-purpose rehabilitation robotic device to correct gait patterns for walking and facilitate aid in sit-to-stand motions [9]. Within this work, motion-capture (mocap) technology was used to record the motion path of the ankle when walking on a treadmill. The path trajectory for the ankle joint is presented in Figure 1a. These mocap data were then used to derive the path trajectories for the knee and hip joints as plotted in Figure 1b,c [9]. The original design of the RoboREHAB leg assembly shown in Figure 2 does not accurately replicate the path trajectories of the knee and hip joints shown in Figure 1b,c due to a lack of degrees of freedom (DOF) in the assembly. In this paper, the RoboREHAB leg assembly was redesigned to improve the path trajectories on the ankle, knee, and hip joints by adding an additional link on the knee joint. This results in increased DOFs such as pitch moment on the knee joint during the gait-motion simulations so that it produces better path trajectories on the joints than the original design, in which only swing motion was allowed on the knee joint. Figure 1: Ideal joint-motion paths for the (**a**) ankle, (**b**) knee, and (**c**) hip joint. Machine-learning solutions have also been researched and developed to aid patients in regaining motor function [10; 11; 12]. One solution in the realm of machine learning is reinforcement learning, a technique that trains an agent to analyze a given pose/state of a subject and suggests actions for the subject to execute to maximize the reward that it receives [13; 14; 15]. The agent is usually trained using an 'actor-critic' network. This agent has an 'actor' that performs the action suggested by the agent and a 'critic' associates a reward to the action performed. The reward comes in two forms: the individual episode reward, R, and the long-term discounted reward that is initially expected from the action, Q.