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

# Agent.Agent

All Samples(67)  |  Call(17)  |  Derive(14)  |  Import(36)

```"""Control Agents based on TD Learning, i.e., Q-Learning and SARSA"""
from .Agent import Agent, DescentAlgorithm
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
```

```"""Greedy-GQ(lambda) learning agent"""
from .Agent import Agent, DescentAlgorithm
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
```

```"""
Experimental Implementation of Natural Actor Critic
"""
import numpy as np
from .Agent import Agent
```
```class NaturalActorCritic(Agent):

"""
the step-based Natural Actor Critic algorithm
as described in algorithm 1 of
```

```"""Least-Squares Policy Iteration [Lagoudakis and Parr 2003]."""
from .Agent import Agent
import rlpy.Tools as Tools
import numpy as np
from scipy import sparse as sp
```
```class LSPI(Agent):

"""Least Squares Policy Iteration reinforcement learning agent.

Args:
```

```
from random  import randint
from Agent   import Agent

class Random(Agent):
```

```#

from Agent import Agent
from numpy import zeros, ones
import numpy as np
from random import randint, randrange, random
import sys

class Q_l(Agent):
```

```
from random  import randint
from Agent   import Agent

import random
```
```class Manual(Agent):

def __init__( self, refm, disc_rate ):
Agent.__init__( self, refm, disc_rate )

```

```#

from Agent import Agent

from random import randint, randrange, random
```
```class HLQ_l(Agent):

def __init__( self, refm, disc_rate, sel_mode, init_Q, Lambda, epsilon=0, gamma=0 ):

Agent.__init__( self, refm, disc_rate )
```

```#

from Agent import Agent

from numpy import zeros
```
```class Freq(Agent):

def __init__( self, refm, disc_rate, epsilon ):

Agent.__init__( self, refm, disc_rate )
```

```#

from Agent import Agent
from numpy import zeros, ones, ceil
import  numpy as np
```
```class MC_AIXI(Agent):

def __init__( self, refm, disc_rate, sims, depth, horizon, \