Skip to main content

A simple agentic AI package using reinforcement learning

Project description

Agentic AI

A simple agentic AI package using reinforcement learning. This package provides a basic implementation of a Q-learning agent that can interact with a simple environment to achieve goals.

Installation

pip install AgenticLearnPro

Usage

from AgenticLearnPro.agent import QLearningAgent
from AgenticLearnPro.environment import SimpleEnv

# Create environment and agent
env = SimpleEnv()
agent = QLearningAgent(state_space=env.state_space, action_space=env.action_space)

# Train the agent
for episode in range(100):
    state = env.reset()
    done = False
    while not done:
        action = agent.choose_action(state)
        next_state, reward, done = env.step(action)
        agent.learn(state, action, reward, next_state)
        state = next_state
    agent.decay_exploration()

# Test the trained agent
state = env.reset()
done = False
total_reward = 0
while not done:
    action = agent.choose_action(state)
    next_state, reward, done = env.step(action)
    total_reward += reward
    state = next_state
    print(f"State: {state}, Action: {action}, Reward: {reward}")
print(f"Total reward: {total_reward}")

Features

  • Simple Q-learning agent implementation
  • Basic environment with states and actions
  • Configurable learning parameters
  • Exploration rate decay for better convergence

License

MIT

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

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

agenticlearnpro-0.1.2.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

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

agenticlearnpro-0.1.2-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

Details for the file agenticlearnpro-0.1.2.tar.gz.

File metadata

  • Download URL: agenticlearnpro-0.1.2.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for agenticlearnpro-0.1.2.tar.gz
Algorithm Hash digest
SHA256 9744fb00959e5889788eb997ce5a104a5464f78d7f26cd41297ec299dc3ea5ac
MD5 20ccdf77c4771c162511d471899356bd
BLAKE2b-256 afce3e7acaacec7045990a2874efc3bf1eef78b9f3100b1e7894cc2a77a3816c

See more details on using hashes here.

File details

Details for the file agenticlearnpro-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for agenticlearnpro-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 f23166026b78b2391537c910f7066e1b64c98c492afb6354b01e614bad4ca416
MD5 193651b48d9b874e7506c435a354b802
BLAKE2b-256 014858496347323e05880a887bea722db322abcf5b4f23b58f596a69b3a09694

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