We released an alpha version of TensorForce
Source code on GitHub · ReadTheDocs

Have a look at our latest article for an introduction to TensorForce!

from tensorforce import Configuration
from tensorforce.agents import TRPOAgent
from tensorforce.core.networks import layered_network_builder

config = Configuration(
  actions=dict(continuous=False, num_actions=2),
  network=layered_network_builder([dict(type='dense', size=50), dict(type='dense', size=50)])

# Create a Trust Region Policy Optimization agent
agent = TRPOAgent(config=config)

# Get new data from somewhere, e.g. a client to a web app
client = MyClient('', 8080)

# Poll new state from client
state = client.get_state()

# Get prediction from agent, execute
action = agent.act(state=state)
reward = client.execute(action)

# Add experience, agent automatically updates model according to batch size
agent.observe(reward=reward, terminal=False)

More information:
Reinforcement Learning and TensorForce

Stay up to date

Subscribe and we’ll keep you posted with updates on TensorForce and new RL tools.


Got an interesting reinforcement learning problem? Get in touch at contact@reinforce.io!