
<a href="https://pypi.org/project/cpagym/">
<img src="https://raw.githubusercontent.com/accounting-intelligent-ai/cpagym/main/cpagym.png" width = "200" height = "200" alt="logo" align=center />
</a>

# CPAGYM: Accounting [Gym](https://gymnasium.farama.org/)! for Accountant Reinforcement Learning .会计强化学习GYM。

Redefining [Accounting](https://cpanlp.com/)!
Developed by **Bfsu Intelligent Accounting Team** (c) 2023
[Github](https://github.com/accounting-intelligent-ai/cpagym)

[![PyPI - Python Version](https://img.shields.io/static/v1?label=pypi&message=v0.0.21&color=blue)](https://pypi.org/project/cpagym/)
[![Downloads](https://static.pepy.tech/badge/cpagym/week)](https://pepy.tech/project/cpagym)

## Install & Import 安装和导入
For detailed installation instructions, see the
[documentation](https://cpanlp.com/documentation).
```python
pip install cpagym
import gymnasium as gym
import cpagym as cg 
```

## Accounting Envs 主要会计环境
1. Moral_Hazard 道德风险
```python
env = gym.make("Moral_Hazard-v1")
observation, info = env.reset(seed=2)
n_steps = 10
for _ in range(n_steps):
    # Random action
    action = env.action_space.sample()
    observation, reward, terminated, truncated, info = env.step(action)
    print(observation, reward, terminated, truncated, info )
    if terminated or truncated:
        observation, info = env.reset()
```
2. AsymmetricInfo 信息不对称
```python
env = gym.make("AsymmetricInfo-v1")
observation, info = env.reset(seed=2)
n_steps = 10
for _ in range(n_steps):
    # Random action
    action = env.action_space.sample()
    observation, reward, terminated, truncated, info  = env.step(action)
    print(observation, reward, terminated, truncated, info )
    if terminated or truncated:
        observation, info = env.reset()
```
Check out: https://cpanlp.com/reinforcement