ailiga.trained_fighter.TrainedFighter
- class ailiga.trained_fighter.TrainedFighter(lambda_env)[source]
Bases:
FighterA trained fighter.
- __init__(lambda_env)
Methods
__init__(lambda_env)assert_env([name])Assert that the env is compatible with the fighter.
Return a list of compatible envs.
Get the default savefile name.
Get the name of the env.
get_logger()get_name()Get the name of the fighter.
Get the policy.
get_user()Get the user name.
load([savefile])Load the policy from a file.
reset()Reset the policy and the environment.
reward_metric(rews)Pick the reward of the agent we are training.
save([policy, savefile])Save the policy.
train([seed, reset])train_all()valid_env(name)Attributes
agentindexlogdirtest_envstest_numtrain_envstraindirtraining_numuser- assert_env(name=None)
Assert that the env is compatible with the fighter.
- classmethod compatible_envs()
Return a list of compatible envs.
- get_env_name()
Get the name of the env.
- Return type:
str
- classmethod get_name()
Get the name of the fighter.
- get_policy()
Get the policy.
- classmethod get_user()
Get the user name.