From 715d02d92726fe3d136c0c01eb854e6d6c6323eb Mon Sep 17 00:00:00 2001 From: baijinqiu <2522827873@qq.com> Date: Sat, 23 Dec 2023 17:53:23 +0800 Subject: [PATCH] 'run_football_x(#2)' --- .../documents/api/runners/runner_football.rst | 67 ++++++++++--------- 1 file changed, 34 insertions(+), 33 deletions(-) diff --git a/docs/source/documents/api/runners/runner_football.rst b/docs/source/documents/api/runners/runner_football.rst index d6193a3dd..cb9c67f28 100644 --- a/docs/source/documents/api/runners/runner_football.rst +++ b/docs/source/documents/api/runners/runner_football.rst @@ -10,63 +10,64 @@ A generic framework for training and testing reinforcement learning in the Footb **PyTorch:** .. py:class:: - xuance.torch.runners.runner_football.Football_Runner(args) + xuance.torch.runners.runner_football.Football_Runner(args) - :param args: the arguments. - :type args: Namespace + :param args: the arguments. + :type args: Namespace .. py:function:: - xuance.torch.runners.runner_football.Football_Runner.get_agent_num() + xuance.torch.runners.runner_football.Football_Runner.get_agent_num() - Return the number of agents and adversaries in the environment. + Return the number of agents and adversaries in the environment. - :return: the number of agents and adversaries. - :rtype: tuple + :return: the number of agents and adversaries. + :rtype: tuple .. py:function:: - xuance.torch.runners.runner_football.Football_Runner.get_battles_info() + xuance.torch.runners.runner_football.Football_Runner.get_battles_info() - Calculate and return information about the total number of battles in the environment and the number of battles won. + Calculate and return information about the total number of battles in the environment and the number of battles won. - :return: the formation about the total number of battles in the environment and the number of battles won. - :rtype: tuple + :return: the formation about the total number of battles in the environment and the number of battles won. + :rtype: tuple .. py:function:: - xuance.torch.runners.runner_football.Football_Runner.get_battles_result(last_battles_info) + xuance.torch.runners.runner_football.Football_Runner.get_battles_result(last_battles_info) - Provide the win rate based on changes in the total number of battles and battles won between the last recorded point in time and the current state of the environment. + Provide the win rate based on changes in the total number of battles and battles won between the last recorded point in time and the current state of the environment. - :param last_battles_info: contain information about the battles at the last recorded point in time. - :type last_battles_info: tuple - :return: the win rate in the environment. - :rtype: float + :param last_battles_info: contain information about the battles at the last recorded point in time. + :type last_battles_info: tuple + :return: the win rate in the environment. + :rtype: float .. py:function:: - xuance.torch.runners.runner_football.Football_Runner.run_episodes(test_mode) + xuance.torch.runners.runner_football.Football_Runner.run_episodes(test_mode) - Execute a series of episodes in the environment, either for training or testing purposes. + Execute a series of episodes in the environment, either for training or testing purposes. - :param test_mode: control the mode in which episodes are executed. - :type test_mode: bool - :return: the average episode score achieved during the training or testing process. - :rtype: float + :param test_mode: control the mode in which episodes are executed. + :type test_mode: bool + :return: the average episode score achieved during the training or testing process. + :rtype: float .. py:function:: - xuance.torch.runners.runner_football.Football_Runner.test_episodes(test_T, n_test_runs) + xuance.torch.runners.runner_football.Football_Runner.test_episodes(test_T, n_test_runs) - xxxxxx. + Run multiple testing cycles in a testing mode and calculate statistics such as test scores and win rates. - :param test_T: xxxxxx. - :type test_T: xxxxxx - :param n_test_runs: xxxxxx. - :type n_test_runs: xxxxxx - :return: xxxxxx. - :rtype: xxxxxx + :param test_T: the time step for recording test results. + :type test_T: int + :param n_test_runs: the number of testing cycles to execute. + :type n_test_runs: int + :return: the average test score, the standard deviation of test scores and the win rate. + :rtype: tuple .. py:function:: - xuance.torch.runners.runner_football.Football_Runner.benchmark() + xuance.torch.runners.runner_football.Football_Runner.benchmark() - xxxxxx. + This method conducts a thorough performance evaluation throughout the training and testing processes, + providing comprehensive assessment results and statistics.. .. raw:: html