mlpack
Functions
rl_components_test.cpp File Reference
#include <mlpack/core.hpp>
#include <mlpack/methods/reinforcement_learning/environment/mountain_car.hpp>
#include <mlpack/methods/reinforcement_learning/environment/continuous_mountain_car.hpp>
#include <mlpack/methods/reinforcement_learning/environment/cart_pole.hpp>
#include <mlpack/methods/reinforcement_learning/environment/double_pole_cart.hpp>
#include <mlpack/methods/reinforcement_learning/environment/continuous_double_pole_cart.hpp>
#include <mlpack/methods/reinforcement_learning/environment/acrobot.hpp>
#include <mlpack/methods/reinforcement_learning/environment/pendulum.hpp>
#include <mlpack/methods/reinforcement_learning/replay/random_replay.hpp>
#include <mlpack/methods/reinforcement_learning/policy/greedy_policy.hpp>
#include "catch.hpp"
#include "test_catch_tools.hpp"
Include dependency graph for rl_components_test.cpp:

Functions

 TEST_CASE ("SimplePendulumTest", "[RLComponentsTest]")
 Constructs a Pendulum instance and check if the main routine works as it should be working.
 
 TEST_CASE ("SimpleContinuousMountainCarTest", "[RLComponentsTest]")
 Constructs a Continuous MountainCar instance and check if the main rountine works as it should be.
 
 TEST_CASE ("SimpleAcrobotTest", "[RLComponentsTest]")
 Constructs a Acrobot instance and check if the main rountine works as it should be.
 
 TEST_CASE ("SimpleMountainCarTest", "[RLComponentsTest]")
 Constructs a MountainCar instance and check if the main rountine works as it should be.
 
 TEST_CASE ("SimpleCartPoleTest", "[RLComponentsTest]")
 Constructs a CartPole instance and check if the main routine works as it should be.
 
 TEST_CASE ("DoublePoleCartTest", "[RLComponentsTest]")
 Constructs a DoublePoleCart instance and check if the main routine works as it should be.
 
 TEST_CASE ("ContinuousDoublePoleCartTest", "[RLComponentsTest]")
 Constructs a ContinuousDoublePoleCart instance and check if the main routine works as it should be.
 
 TEST_CASE ("RandomReplayTest", "[RLComponentsTest]")
 Construct a random replay instance and check if it works as it should be. More...
 
 TEST_CASE ("GreedyPolicyTest", "[RLComponentsTest]")
 Construct a greedy policy instance and check if it works as it should be.
 

Detailed Description

Author
Shangtong Zhang
Rohan Raj

Basic test for the components of reinforcement learning algorithms.

mlpack is free software; you may redistribute it and/or modify it under the terms of the 3-clause BSD license. You should have received a copy of the 3-clause BSD license along with mlpack. If not, see http://www.opensource.org/licenses/BSD-3-Clause for more information.

Function Documentation

◆ TEST_CASE()

TEST_CASE ( "RandomReplayTest"  ,
""  [RLComponentsTest] 
)

Construct a random replay instance and check if it works as it should be.

So far there should be only one record in the memory

Overwrite the memory with a nonsense record

Sample several times, the original record shouldn't appear