Skip to content

Commit

Permalink
'run_football_x(#2)'
Browse files Browse the repository at this point in the history
  • Loading branch information
baijinqiu committed Dec 23, 2023
1 parent 6a38977 commit 715d02d
Showing 1 changed file with 34 additions and 33 deletions.
67 changes: 34 additions & 33 deletions docs/source/documents/api/runners/runner_football.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 715d02d

Please sign in to comment.