Skip to main content

Cognitive science-inspired reinforcement learning research library

Project description

Kioku

A cognitive science-inspired reinforcement learning research library. Kioku is designed to be modular and give you tools to experiment with classical and modern RL algorithms and build your own.

Features

Kioku currently includes implementations of DQN, A2C and PPO, along with reusable components for memory buffers, schedulers, models and environments. It supports the following agents based on classical and SOTA RL methods:

Installation

Install via PyPI:

pip install kioku-rl

Usage

Run an example:

python examples/ppo_cartpole.py

or use it in your own programs as a library:

from kioku.schedulers import StaticScheduler
from kioku.environments import GymEnvironment
from kioku.agents import PPOAgent
from kioku.trainers import Trainer
from kioku.utils import set_seed

set_seed(42)

env = GymEnvironment("CartPole-v1")
render_env = GymEnvironment("CartPole-v1", render_mode="human")

agent = PPOAgent(
    observation_size=env.observation_size,
    num_actions=env.action_size,
    learning_rate=StaticScheduler(1e-3)
)

trainer = Trainer(agent, env)
trainer.train(100000)

tester = Trainer(agent, render_env)
results = tester.test(10)

Results

DQN Cartpole:

DQN cartpole episde rewards DQN cartpole gif

PPO Cartpole:

PPO CartPole episode rewards PPO CartPole gif

PPO Lunar Lander:

PPO Lunar Lander episode rewards PPO Lunar Lander gif

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

kioku_rl-0.1.1.tar.gz (25.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

kioku_rl-0.1.1-py3-none-any.whl (39.8 kB view details)

Uploaded Python 3

File details

Details for the file kioku_rl-0.1.1.tar.gz.

File metadata

  • Download URL: kioku_rl-0.1.1.tar.gz
  • Upload date:
  • Size: 25.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for kioku_rl-0.1.1.tar.gz
Algorithm Hash digest
SHA256 2c2a38a84314c44f3ea41e778e7bfd84b56f1f6677b417e61028330a3e03050f
MD5 15d0739a741bae7d9a41a0c043bd8746
BLAKE2b-256 9d795c4e9b53f5e57702ddb56e9a35ffa3ab1766c8218db69d630e4f1db1cb07

See more details on using hashes here.

Provenance

The following attestation bundles were made for kioku_rl-0.1.1.tar.gz:

Publisher: publish.yml on smntic/kioku

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file kioku_rl-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: kioku_rl-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 39.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for kioku_rl-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 67043145dfacc25a2b94c4567939e29d1f593b3ff47c3bfeefc9c3cccfe73858
MD5 b33a51323c1a62bfad0a8a3dac951b27
BLAKE2b-256 4723ab67d317ea55c466241c2f675612234b0556174e8c497d63d1cb97305e71

See more details on using hashes here.

Provenance

The following attestation bundles were made for kioku_rl-0.1.1-py3-none-any.whl:

Publisher: publish.yml on smntic/kioku

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page