Skip to main content

Python bindings for Swift Actor-Critic algorithm

Project description

Swift Actor-Critic

Python bindings for the Swift Actor-Critic algorithm - a fast and robust reinforcement learning algorithm.

Installation

pip install swift-actor-critic

Usage

from swift_actor_critic import SwiftActorCritic

# Initialize the actor-critic
ac = SwiftActorCritic(
    num_features=100,
    num_actions=4,
    lambda_=0.9,
    alpha=0.01,
    epsilon=1e-5,
    meta_step_size=1e-3,
    eta=0.1,
    eta_actor=0.1,
    decay=0.999,
    action_prob_at_init=0.1,
    seed=42
)

# Take a step with feature indices, reward, and discount factor
action = ac.step(
    feature_indices=[1, 5, 10],  # Active feature indices
    reward=1.0,
    gamma=0.99
)

print(f"Selected action: {action}")

Features

  • Fast C++ implementation with Python bindings
  • Efficient handling of sparse feature representations
  • Adaptive step-size algorithm
  • Support for eligibility traces (lambda parameter)

License

MIT License

Links

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

swift_actor_critic-0.1.4.tar.gz (2.1 kB view details)

Uploaded Source

Built Distribution

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

swift_actor_critic-0.1.4-py3-none-any.whl (2.3 kB view details)

Uploaded Python 3

File details

Details for the file swift_actor_critic-0.1.4.tar.gz.

File metadata

  • Download URL: swift_actor_critic-0.1.4.tar.gz
  • Upload date:
  • Size: 2.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for swift_actor_critic-0.1.4.tar.gz
Algorithm Hash digest
SHA256 d8147bfe3879139096bb1be34e65246801b2d0c7118ac3004b5df81ee67adde7
MD5 7e3faf05a2b9b91047b450187ccf109e
BLAKE2b-256 7cc0c1561443f9b5a469158f680f4a64c3b8a2855047258a2eef6fb5701df081

See more details on using hashes here.

File details

Details for the file swift_actor_critic-0.1.4-py3-none-any.whl.

File metadata

File hashes

Hashes for swift_actor_critic-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 173242b9a7cc23c8c2f67a4009c30d103c5e888e348eae7eb6f970121e9665d4
MD5 e6da39bbe8db0466641d585d0561aeaa
BLAKE2b-256 058962c33fa11b5528edec7a486491141e51f0f57c2ea47e2f2f9b37897786df

See more details on using hashes here.

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