This repository has been archived on 2026-05-02. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
-----/agent_diy/conf/conf.py
2026-04-26 12:38:39 +08:00

44 lines
1.1 KiB
Python

#!/usr/bin/env python3
# -*- coding: UTF-8 -*-
###########################################################################
# Copyright © 1998 - 2026 Tencent. All Rights Reserved.
###########################################################################
"""
Author: Tencent AI Arena Authors
"""
import numpy as np
# Configuration, including dimension settings and algorithm parameter settings.
# 配置,包含维度设置,算法参数设置
class Config:
# Whether to use CNN networks
# 是否使用CNN网络
USE_CNN = False
VIEW_SIZE = 50 if USE_CNN else 0
FEATURE_VECTOR_SHAPE = (153,)
FEATURE_IMAGE_SHAPE = (4, VIEW_SIZE + 1, VIEW_SIZE + 1)
ACTION_SHAPE = (8,)
VALUE_SHAPE = (1,)
# Discount factor GAMMA in RL
# RL中的回报折扣GAMMA
GAMMA = 0.95
# Initial learning rate
# 初始的学习率
START_LR = 5e-4
# Value function loss coefficient
# 价值函数损失系数
VALUE_LOSS_COEFF = 0.5
# Entropy regularization coefficient
# 熵正则化系数
ENTROPY_LOSS_COEFF = 0.025