Evaluation Space
ah2ac2.evaluation.evaluation_space.EvaluationSpace
Manages the interaction with the AH2AC2 evaluation server.
This class allows users to request new evaluation environments, retrieve information about the ongoing evaluation, and manage the lifecycle of these environments.
Attributes:
Name | Type | Description |
---|---|---|
submission_key |
str
|
The unique key identifying the submission. |
evaluation_environment |
Union[EvaluationEnvironment, None]
|
The currently active evaluation environment, if any. |
Source code in ah2ac2/evaluation/evaluation_space.py
__init__(submission_key: str) -> None
Initializes the EvaluationSpace with a submission key.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
submission_key
|
str
|
The unique key for the submission. |
required |
Source code in ah2ac2/evaluation/evaluation_space.py
info: EvaluationInfo
property
Retrieves information about the overall evaluation process.
This includes the status of all environments associated with the submission key.
Returns:
Type | Description |
---|---|
EvaluationInfo
|
An |
next_environment() -> EvaluationEnvironment
Requests the next official evaluation environment from the server.
Raises:
Type | Description |
---|---|
Exception
|
If a previous environment is still active and not done. |
Returns:
Type | Description |
---|---|
EvaluationEnvironment
|
An |
Source code in ah2ac2/evaluation/evaluation_space.py
new_test_environment(num_players: int, candidate_position: list[int]) -> EvaluationEnvironment
Requests a new test environment with a random agent.
This is useful for testing and debugging the agent's interaction with the environment.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
num_players
|
int
|
The number of players in the test environment. |
required |
candidate_position
|
list[int]
|
A list of positions (0-indexed) that the candidate agent will control. |
required |
Returns:
Type | Description |
---|---|
EvaluationEnvironment
|
An |
Source code in ah2ac2/evaluation/evaluation_space.py
ah2ac2.evaluation.evaluation_space.EvaluationInfo
Overall information about the evaluation process for a submission.
Attributes:
Name | Type | Description |
---|---|---|
current_env |
Union[EvaluationEnvironmentInfo, None]
|
Information about the currently active environment, if any. |
all_envs |
list[EvaluationEnvironmentInfo]
|
A list containing information for all environments associated with the submission key. |
human_ai_eval_done |
bool | None
|
A flag indicating whether the human-AI evaluation phase is complete for this submission. |
Source code in ah2ac2/evaluation/evaluation_space.py
ah2ac2.evaluation.evaluation_space.EvaluationEnvironmentInfo
Information about a single evaluation environment.
Attributes:
Name | Type | Description |
---|---|---|
status |
EnvironmentStatus
|
The current status of this environment. |
score |
Union[int, None]
|
The final score achieved in this environment, if DONE; otherwise None. |
num_players |
Union[int, None]
|
The number of players in this environment. |
candidate_controlling |
list[str]
|
A list of agent IDs that the candidate (submission) controls in this environment. |
Source code in ah2ac2/evaluation/evaluation_space.py
ah2ac2.evaluation.evaluation_space.EnvironmentStatus
Status of an evaluation environment.