forked from VSharp-team/VSharp
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
30 changed files
with
127 additions
and
123 deletions.
There are no files selected for viewing
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,23 @@ | ||
from .game import GameState | ||
from collections import defaultdict | ||
|
||
from common.classes import Agent2Result, AgentResultsOnGameMaps, GameMapsModelResults | ||
|
||
from common.game import GameState | ||
|
||
|
||
def get_states(game_state: GameState) -> set[int]: | ||
return {s.Id for s in game_state.States} | ||
|
||
|
||
def invert_mapping_mrgm_gmmr( | ||
model_results_on_map: AgentResultsOnGameMaps, | ||
) -> GameMapsModelResults: | ||
inverse_mapping: GameMapsModelResults = defaultdict(list) | ||
|
||
for named_agent, list_of_map_result_mappings in model_results_on_map.items(): | ||
for map_result_mapping in list_of_map_result_mappings: | ||
map, result = (map_result_mapping.map, map_result_mapping.game_result) | ||
|
||
inverse_mapping[map].append(Agent2Result(named_agent, result)) | ||
|
||
return inverse_mapping |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
1 change: 0 additions & 1 deletion
1
VSharp.ML.AIAgent/conn/socket_manager.py → .../connection/broker_conn/socket_manager.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
from contextlib import contextmanager | ||
|
||
import websocket | ||
|
||
from .requests import aquire_ws, return_ws | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 2 additions & 1 deletion
3
VSharp.ML.AIAgent/agent/unsafe_json.py → ...onnection/game_server_conn/unsafe_json.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
Oops, something went wrong.