Releases: HarrisonKramer/LensRL
Releases · HarrisonKramer/LensRL
LensRL Initial Release
LensRL Initial Release Notes
Version: 0.1.0
Date: 2025-01-22
We are pleased to announce the initial release of LensRL, a scientific toolkit aimed at automating optical lens design through reinforcement learning (RL). This framework integrates with Optiland to provide a modular environment for optimizing optical systems using standard RL methodologies.
Key Features
Core Framework
- Gymnasium-Compatible Environment: Introduces
LensDesignEnv, a standardized RL environment compliant with the OpenAI Gym API, facilitating the application of agents to optical design tasks. - Configurable Optical System: Implements
ConfigurableOptic, a dynamic class bridging RL agents with the Optiland physics engine for real-time ray tracing and analysis.
Optimization & Action Space
- Hybrid Action Space: Supports both continuous parameters and discrete architectural changes.
- Optimization Modules: Includes
OptimizeRadiiActionandOptimizeAllActionfor local gradient-based refinement of surface radii and thicknesses. - Topological Updates: Provides discrete actions for structural changes, including
AddLensAction,ChangeGlassAction(supporting Schott catalog), andMoveStopAction.
Reward Architecture
- Modular Reward Functions: A suite of configurable objectives to guide agent behavior:
RMSReward: Minimizes root-mean-square spot size.ComplexityReward: Penalizes excessive optical elements to encourage parsimony.ApertureFOVReward: Incentivizes larger apertures and wider fields of view.CompositeReward: Allows for the weighted combination of multiple objectives.
Utilities
- Normalization Engine: Includes a robust normalization utility to scale optical parameters (e.g., radii, refractive indices) into stable ranges for neural network training.
System Requirements
- Python 3.x
- Dependencies:
optiland,numpy,gymnasium.
Documentation
- See
README.mdfor installation instructions and architecture overview. - A minimum working example is provided in
examples/minimum_working_example.ipynb.