Copyright | (c) Sentenai 2017 |
---|---|
License | BSD3 |
Maintainer | sam@sentenai.com |
Stability | experimental |
Portability | non-portable |
Safe Haskell | None |
Language | Haskell2010 |
In lieu of a history monad embedded in models maintain a logger monad for easily debugging environments.
- data Event r o a = Event Integer r o a
- class Monad m => Logger m where
- newtype NoopLogger m x = NoopLogger {
- runNoopLogger :: m x
- newtype DebugLogger m x = DebugLogger {
- runDebugLogger :: m x
Documentation
Our primary datatype for an event in a trace. Contains the episode number,
reward, state, and action taken (in that order).
TODO: change the ordering to Event Integer s a r
MonadWriter (DList Event) Environment # | |
Monad t => MonadWriter (DList (Event Reward s a)) (GymEnvironmentT s a t) # | |
(Show a, Show o, Show r) => Show (Event r o a) Source # | |
class Monad m => Logger m where Source #
A logging monad, this is seperate from a History monad in that this is intended to be used for debugging and for toggling log information.
FIXME: In reality, this is halfway between commenting/uncommenting print statements, and passing CPP flags. Something should be done about this or a real logging Monad should be brought in.
newtype NoopLogger m x Source #
A prebuilt type which doesn't actually log anything.
NoopLogger | |
|
Monad m => Monad (NoopLogger m) Source # | |
Functor m => Functor (NoopLogger m) Source # | |
Applicative m => Applicative (NoopLogger m) Source # | |
MonadIO m => MonadIO (NoopLogger m) Source # | |
MonadThrow m => MonadThrow (NoopLogger m) Source # | |
Monad m => Logger (NoopLogger m) Source # | |
MonadEnv m s a r => MonadEnv (NoopLogger m) s a r Source # | |
newtype DebugLogger m x Source #
A prebuilt type that does all levels of logging
DebugLogger | |
|
Monad m => Monad (DebugLogger m) Source # | |
Functor m => Functor (DebugLogger m) Source # | |
Applicative m => Applicative (DebugLogger m) Source # | |
MonadIO m => MonadIO (DebugLogger m) Source # | |
MonadThrow m => MonadThrow (DebugLogger m) Source # | |
Monad m => Logger (DebugLogger m) Source # | |
MonadEnv m s a r => MonadEnv (DebugLogger m) s a r Source # | |