Skip to main content

Accounting Reinforcement Learning GYM for Ai-Accountants .为会计人打造的专属智能会计强化学习框架。

Project description

RL-Accounting 会计强化学习

logo

Redefining Accounting! Developed by Bfsu Ai-Accounting Team (c) 2023 Github

PyPI - Python Version Downloads

Install & Import 安装和导入

For detailed installation instructions, see the documentation.

pip install cpagym
import gymnasium as gym
import cpagym as cg 
import torch

Accounting Envs 主要会计环境

1. Moral_Hazard 道德风险

Action Space

Num Action Unit
0 Discharge of duty 0
1 Due diligence 1

Observation Space

The observation is a ndarray with shape (6,) that provides information about the two rotational joint angles as well as their angular velocities:

Num Observation Min Max
0 Project success rate 0 1
1 Project success return 0 1
env = gym.make("Moral_Hazard-v1")#Instantiate the Environment载入道德风险环境
state, info = env.reset(seed=2)#初始化
n_steps = 10
for _ in range(n_steps):
    action = env.action_space.sample()#随机行动
    state, reward, terminated, truncated, info = env.step(action)
    print(observation, reward, terminated, truncated, info )
    if terminated or truncated:
        observation, info = env.reset()

Accounting RL-Algorithm 会计强化学习算法

1. Train the Agent with DQN

Accounting RL-Agent 会计强化学习代理人

agent=cg.Agent(state_size=1,action_size=2)#Instantiate the Agent载入会计智能体
env = gym.make("Moral_Hazard-v1")
state, info = env.reset(seed=2)
action = agent.act(state, eps)#最优化行动
next_state, reward, done, _,_ = env.step(action)
agent.step(state, action, reward, next_state, done)
print(agent.memory.memory)

配套智能会计包CPANLP

logo

Check out: https://cpanlp.com/reinforcement

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

cpagym-0.1.17.tar.gz (17.8 kB view details)

Uploaded Source

Built Distribution

cpagym-0.1.17-py3-none-any.whl (25.0 kB view details)

Uploaded Python 3

File details

Details for the file cpagym-0.1.17.tar.gz.

File metadata

  • Download URL: cpagym-0.1.17.tar.gz
  • Upload date:
  • Size: 17.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.10

File hashes

Hashes for cpagym-0.1.17.tar.gz
Algorithm Hash digest
SHA256 dcea63fd93e431f4f68b2731ed14b75dd6a30b0048b27fa530ac60f05f636309
MD5 463614e863b3142d48723a255faf94d6
BLAKE2b-256 f880fcedcf8d37092bdec7939a4c2ded7780618d062abb39cd1a7e3a3e5ee7b0

See more details on using hashes here.

File details

Details for the file cpagym-0.1.17-py3-none-any.whl.

File metadata

  • Download URL: cpagym-0.1.17-py3-none-any.whl
  • Upload date:
  • Size: 25.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.10

File hashes

Hashes for cpagym-0.1.17-py3-none-any.whl
Algorithm Hash digest
SHA256 6012b6140b31c1ba62662c5919b37677f3bb00243e9d123dba5d06702b732117
MD5 dc651c80e91893a88e570155fcf87755
BLAKE2b-256 dbbe4501e1afe92f4346ce49464f95d2ec3097f2b5cbdf731de235f65b21b8ea

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page