Initial robot vacuum code

This commit is contained in:
2026-04-26 12:38:39 +08:00
commit ca6234c941
38 changed files with 1673 additions and 0 deletions

43
agent_diy/conf/conf.py Normal file
View File

@@ -0,0 +1,43 @@
#!/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