hisss.KillBattleSnakeRewardConfig

hisss.KillBattleSnakeRewardConfig#

class hisss.KillBattleSnakeRewardConfig(living_reward=0.0, terminal_reward=1.0)[source]#

Bases: BattleSnakeRewardConfig

Configuration for the Kill-based BattleSnake reward function.

This reward function acts as a zero-sum or monotone game where cumulative un-discounted rewards balance out: - 2 players alive: zero-sum game around cum_reward of 2/3 - 3 players alive: monotone game around cum_reward of 1/3 (kill reward is 1/3) - 4 players alive: monotone game around starting point of zero

__init__(living_reward=0.0, terminal_reward=1.0)#

Methods

__init__([living_reward, terminal_reward])

Attributes

living_reward

The reward given to a snake for surviving a turn.

terminal_reward

The base reward given/taken when a snake wins/dies.