Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cpagym

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cpagym

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

  • 0.1.17
  • PyPI
  • Socket score

Maintainers
1

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
NumActionUnit
0Discharge of duty0
1Due diligence1
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:

NumObservationMinMax
0Project success rate01
1Project success return01
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

Keywords

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc