Examples

This gallery contains examples demonstrating the functionality of scikit-agent. The examples are organized by topic and show how to use the various modules and classes in practical scenarios.

Each example is designed to be self-contained and can be run independently. The examples demonstrate real-world usage patterns and best practices for using scikit-agent in your research and applications. Monte Carlo simulation is demonstrated within the model examples (the consumption-portfolio and resource extraction walkthroughs both simulate their models).

Algorithms

This section contains examples of different algorithms available in scikit-agent. These examples demonstrate how to use various solution methods, optimization algorithms, and numerical techniques.

Solving a Block Directly (Non-Recurring)

Solving a Block Directly (Non-Recurring)

Training a Policy Network Against a Known Solution

Training a Policy Network Against a Known Solution

The Maliar Training Loop on a Model With No Closed-Form Solution

The Maliar Training Loop on a Model With No Closed-Form Solution

PPO via Stable-Baselines3 on the D-4 Benchmark

PPO via Stable-Baselines3 on the D-4 Benchmark

Models

Models written as scikit-agent blocks: decision problems, games, and the diagrams that state their structure. A block says who decides what, knowing what, and paid for what, which is a general enough description that the models here are drawn from economics, from game theory and from the AI-safety literature alike – and the list is open.

Some of these models are solved for a policy, with reinforcement learning or other computational methods. Others are read rather than solved: what a decision must account for, and what an agent has an incentive to observe or to move, are properties of a model’s structure, and are answerable before any policy is computed.

Incentives in Content Recommendation: Wanting Control Versus Having It

Incentives in Content Recommendation: Wanting Control Versus Having It

Cournot: Solving for a Nash Equilibrium

Cournot: Solving for a Nash Equilibrium

Resource Extraction Model

Resource Extraction Model

Consumption-Saving-Portfolio Model

Consumption-Saving-Portfolio Model

Incentives in Grade Prediction: Observing Versus Responding

Incentives in Grade Prediction: Observing Versus Responding

Strategic Relevance: Solving the Tree Killer

Strategic Relevance: Solving the Tree Killer

Benchmark Consumption Models

Benchmark Consumption Models

Gallery generated by Sphinx-Gallery