Skip to main content

Environment-specific plugins for the DPCT framework

Project description

dpct-env

Environment-specific plugins for the DPCT framework.

This package provides:

  • Fitness functions — class-based fitness computation for specific environments
  • Results processors — Comet ML logging for environment-specific metrics
  • Environment evaluations — documentation on environment suitability for DPCT

Installation

pip install dpct-env

Usage

Fitness Functions

from dpct_env.fitness import get_fitness_functions, ControlEffortFitness

# Get all fitness functions registered for CartPole-v1
fns = get_fitness_functions("CartPole-v1")

# Compute a fitness value
fitness = fns["stability_ratio"](observation_history=obs, action_history=acts)

# Use a fitness function directly
effort_fn = ControlEffortFitness(mode="changes")
fitness = effort_fn(observation_history=obs, action_history=acts)

Results Processors

from dpct_env.processors import create_environment_results_processor

processor = create_environment_results_processor("CartPole-v1")
processor.log_results(experiment=exp, individual=ind, history=history)

Registered Environments

Environment Fitness Functions
CartPole-v1 control_effort, observation_variance, stability_ratio
MountainCar-v0 control_effort, height_achieved
Acrobot-v1 control_effort, height_achieved
Pendulum-v1 control_effort, observation_variance

Architecture

dpct-env  ──depends on──▶  dpct
     │                        │
     └── provides plugins ───┘

dpct-env is a pure plugin package — it imports from dpct but dpct never imports from dpct-env. This keeps the core framework clean while allowing environment-specific functionality to evolve independently.

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

dpct_env-0.0.3.tar.gz (18.0 kB view details)

Uploaded Source

Built Distribution

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

dpct_env-0.0.3-py3-none-any.whl (19.4 kB view details)

Uploaded Python 3

File details

Details for the file dpct_env-0.0.3.tar.gz.

File metadata

  • Download URL: dpct_env-0.0.3.tar.gz
  • Upload date:
  • Size: 18.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for dpct_env-0.0.3.tar.gz
Algorithm Hash digest
SHA256 101ddf8f99bb93ee3b83157a957fd982ebe1710bdad2cc8519a4722c37d432f8
MD5 916a66bb90949d7657a22a5b424cd3d2
BLAKE2b-256 a086aa78688dd26dde12dba4a5c35afc2b5d1b3aaa899ebfb867bf0cd9cab04e

See more details on using hashes here.

File details

Details for the file dpct_env-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: dpct_env-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 19.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for dpct_env-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 53600ee0b2d78c3e22012b30128a520a0738eec8b24a355ad75be9b791b32687
MD5 57d3c71fedad789143329260ba20795a
BLAKE2b-256 9c1c154f058be5d0318bd786beee341e20778b0a5383666c635e566cc64ff95f

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