Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(4)  |  Call(0)  |  Derive(2)  |  Import(2)

src/r/l/rlpy-HEAD/rlpy/Agents/TDControlAgent.py   rlpy(Download)
"""Control Agents based on TD Learning, i.e., Q-Learning and SARSA"""
from .Agent import Agent, DescentAlgorithm
from rlpy.Tools import addNewElementForAllActions, count_nonzero
import numpy as np
 
class TDControlAgent(DescentAlgorithm, Agent):
 
    """
    abstract class for the control variants of the classical linear TD-Learning.
    It is the parent of SARSA and Q-Learning

src/r/l/rlpy-HEAD/rlpy/Agents/Greedy_GQ.py   rlpy(Download)
"""Greedy-GQ(lambda) learning agent"""
from .Agent import Agent, DescentAlgorithm
from rlpy.Tools import addNewElementForAllActions, count_nonzero
import numpy as np
from copy import copy
class Greedy_GQ(DescentAlgorithm, Agent):
    lambda_ = 0  # lambda Parameter in SARSA [Sutton Book 1998]
    eligibility_trace = []
    # eligibility trace using state only (no copy-paste), necessary for dabney
    # decay mode