Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
152 commits
Select commit Hold shift + click to select a range
ae57e30
adapt to new cyst
ondrej-lukas Nov 28, 2024
95f4a03
adapt to new cyst
ondrej-lukas Nov 28, 2024
aecf1d8
adapt to new cyst
ondrej-lukas Nov 28, 2024
bd4c98a
adapt to new cyst
ondrej-lukas Nov 28, 2024
b439502
adapt to new cyst
ondrej-lukas Nov 29, 2024
6907bac
better probabilistic graph
ondrej-lukas Jan 19, 2025
a4d68b6
Add processing for join and quit
ondrej-lukas Nov 26, 2024
5f19290
Add new Cyst world
ondrej-lukas Nov 28, 2024
961d21d
use cyst as backend
ondrej-lukas Nov 28, 2024
d2fa4eb
add asynchronous processing
ondrej-lukas Nov 28, 2024
fdc1a96
cooridnator to receive cyst config over network
ondrej-lukas Nov 29, 2024
8658045
read cyst objects from json
ondrej-lukas Nov 29, 2024
e1fb25b
Update args
ondrej-lukas Nov 29, 2024
fa41519
modify coordinator for receiving config over http
ondrej-lukas Dec 3, 2024
3b78694
only start the task config if filename is provided
ondrej-lukas Dec 3, 2024
d803275
correctly initialize the class
ondrej-lukas Dec 3, 2024
b126957
new configuration for cyst testing
ondrej-lukas Dec 3, 2024
246399f
Parse cyst objects to get strating states
ondrej-lukas Dec 3, 2024
29edbd5
extract starting states from cyst objects
ondrej-lukas Dec 3, 2024
726bc8a
re-design graceful shutdown
ondrej-lukas Dec 3, 2024
0e1f76b
Solve joining with string conversion
ondrej-lukas Dec 3, 2024
95dc62b
convert enum to str for MATH statement
ondrej-lukas Dec 3, 2024
38315e8
send requests to cyst
ondrej-lukas Dec 3, 2024
4a439fe
propagate exceptions
ondrej-lukas Dec 3, 2024
811b8f8
redesign exception handelling
ondrej-lukas Dec 3, 2024
9a1b1bc
raise asyncio cancelled error properly
ondrej-lukas Dec 3, 2024
8df20c1
process result of scan network
ondrej-lukas Dec 3, 2024
f019ec0
create variable 'last_action' for all branches
ondrej-lukas Dec 3, 2024
764ce74
load rewards from the config file
ondrej-lukas Dec 3, 2024
ae437a8
replace enum with str representation
ondrej-lukas Dec 3, 2024
530dd45
better processing of cyst replies
ondrej-lukas Dec 4, 2024
0c8c713
Add eq implemenation
ondrej-lukas Dec 18, 2024
89f5fa0
Process more action types
ondrej-lukas Dec 18, 2024
fdaaad3
Simplified version of coordinator
ondrej-lukas Dec 20, 2024
cc21a4c
Add allowed roles
ondrej-lukas Dec 27, 2024
a73091b
catch exceptions in fetching init objects
ondrej-lukas Dec 27, 2024
53ccb0a
Process actions in asyncio tasks
ondrej-lukas Dec 27, 2024
c622571
Fix registering via subtask
ondrej-lukas Jan 2, 2025
d01c8a6
better subtask handelling
ondrej-lukas Jan 2, 2025
9ab2e51
Change QuitGame Processing to use subtasks
ondrej-lukas Jan 2, 2025
c337fcd
Fix reset to use subtasks
ondrej-lukas Jan 2, 2025
539e2b8
Correctly wait for the world
ondrej-lukas Jan 2, 2025
95afaec
Correctly wait for conditions in reset and episode ends
ondrej-lukas Jan 3, 2025
8eb8e57
Check if removed agent was not blocking episode end
ondrej-lukas Jan 3, 2025
ff94f35
Add goal check
ondrej-lukas Jan 3, 2025
05d6c0c
Add rewards
ondrej-lukas Jan 3, 2025
adc1f57
CYST wrapper as extension of coordinator
ondrej-lukas Jan 3, 2025
3e9bf1e
Convert NSG to use coordinor as sueprclass
ondrej-lukas Jan 3, 2025
8b66b99
Add parameters to register_agent
ondrej-lukas Jan 3, 2025
fd65590
correctly pass the parameter
ondrej-lukas Jan 3, 2025
f19863f
Adjust old code and imports
ondrej-lukas Jan 3, 2025
9b7a027
Fix args naming
ondrej-lukas Jan 3, 2025
465f731
fix args
ondrej-lukas Jan 3, 2025
af553ff
fix typos
ondrej-lukas Jan 3, 2025
9a63ca9
Correctly detect possible starting points
ondrej-lukas Jan 3, 2025
fe0a8a1
Fix args confusion
ondrej-lukas Jan 5, 2025
efdf14a
Handle steps in the env
ondrej-lukas Jan 5, 2025
cd5f9a7
Compare Values, not strings
ondrej-lukas Jan 5, 2025
a341247
Covert action to dataclass
ondrej-lukas Jan 5, 2025
766a809
Add eq and hashing
ondrej-lukas Jan 5, 2025
6966b2f
Add method descriptions
ondrej-lukas Jan 5, 2025
4afe151
remove property, it is provided by dataclass
ondrej-lukas Jan 5, 2025
a843bf8
remove debug logging
ondrej-lukas Jan 5, 2025
e97ec8e
Add default values
ondrej-lukas Jan 5, 2025
3cedfb3
Remove dummy implementation of the methods
ondrej-lukas Jan 5, 2025
c121943
Remove debug logs
ondrej-lukas Jan 5, 2025
ed57529
Add processing of ScanNet and findServices
ondrej-lukas Jan 5, 2025
dc04d73
Add args types
ondrej-lukas Jan 6, 2025
7af5603
Add args types
ondrej-lukas Jan 6, 2025
9fb539c
Add support for trajectories
ondrej-lukas Jan 6, 2025
c183982
Reset trajectory correctly
ondrej-lukas Jan 6, 2025
7f4e48b
Remove unused imports
ondrej-lukas Jan 6, 2025
df2fc57
remove debug prints
ondrej-lukas Jan 6, 2025
19f6e37
Graceful stopping solved
ondrej-lukas Jan 6, 2025
23e283d
Move server code to the same file
ondrej-lukas Jan 6, 2025
1a80e48
Remove world_type arg
ondrej-lukas Jan 7, 2025
73b0c61
Do not use the world parameter
ondrej-lukas Jan 7, 2025
efa2d85
Use configparser from to parse task config
ondrej-lukas Jan 8, 2025
a4d6557
Add reading of rewards
ondrej-lukas Jan 8, 2025
206cf99
Read reward from the task config
ondrej-lukas Jan 10, 2025
a3e7b86
build up the reward
ondrej-lukas Jan 16, 2025
1ae7316
Add agent status to compoments
ondrej-lukas Jan 16, 2025
1406989
Adjust the readme
ondrej-lukas Jan 16, 2025
7356fe0
removed unused code
ondrej-lukas Jan 22, 2025
8ab640e
Add win/loss rewards at the end of the episode
ondrej-lukas Jan 22, 2025
845fd12
Fix loading configuration locally
ondrej-lukas Jan 22, 2025
fa2f76d
correctly return reward values
ondrej-lukas Jan 22, 2025
279366b
Compute the config hash correctly
ondrej-lukas Jan 22, 2025
1b28134
Set rewards to 0 upon initialization
ondrej-lukas Jan 22, 2025
c258bf3
reset reward correctly upon episde reset
ondrej-lukas Jan 22, 2025
9862e1b
Make the rewards subsection of env in the config
ondrej-lukas Jan 22, 2025
f390fc5
updated conf to reflect the changes in structure
ondrej-lukas Jan 22, 2025
20a8aaf
reset reward in every step (required for the interative build-up of r…
ondrej-lukas Jan 22, 2025
e03cbf7
reset agent's steps when episode ends
ondrej-lukas Jan 22, 2025
1a1dda0
remove some of the unnecessary sleeps
ondrej-lukas Jan 23, 2025
55a89f1
Add back AgentStatus
ondrej-lukas Jan 23, 2025
48487f5
Change status upon reset
ondrej-lukas Jan 23, 2025
a38dfad
rename variable
ondrej-lukas Jan 23, 2025
07c627f
Make global defender a class
ondrej-lukas Jan 23, 2025
14390d4
Add global defender
ondrej-lukas Jan 23, 2025
0d4621c
Fix AgentStatus comparison
ondrej-lukas Jan 23, 2025
d089e50
params -> parameters
ondrej-lukas Jan 24, 2025
da5aa33
as_json -> to_json
ondrej-lukas Jan 24, 2025
ac8854b
Fix naming issues and to_dict() method
ondrej-lukas Jan 24, 2025
0f16a25
fix method name
ondrej-lukas Jan 24, 2025
fb2d24b
fix method call
ondrej-lukas Jan 24, 2025
2437ef6
Remove old code
ondrej-lukas Jan 24, 2025
f7eb7e3
remove unused imports
ondrej-lukas Jan 24, 2025
6a175f0
unused imports cleanup
ondrej-lukas Jan 24, 2025
dbde424
Action tests disable for now - not applicable with new Coordinator
ondrej-lukas Jan 24, 2025
07c3867
New coordinator test
ondrej-lukas Jan 24, 2025
0c3b413
Code cleanup
ondrej-lukas Jan 24, 2025
1621240
Code cleanup
ondrej-lukas Jan 25, 2025
4360f01
Read max stes from the configuration
ondrej-lukas Jan 25, 2025
0e2e28e
Better comments
ondrej-lukas Jan 25, 2025
a4d8dab
Correctly handle attemps to play after episode ends
ondrej-lukas Jan 25, 2025
1690e53
Timout check and stopping episode if no active player is present
ondrej-lukas Jan 25, 2025
c8aa1a1
Remove duplicate code
ondrej-lukas Jan 26, 2025
8064c75
Do not await action processing
ondrej-lukas Jan 26, 2025
534239a
fix typo
ondrej-lukas Jan 26, 2025
1cc19dd
Better detection of episode end for defender
ondrej-lukas Jan 26, 2025
e573436
Add comments
ondrej-lukas Jan 27, 2025
0ec55ad
Split status changing into separate method
ondrej-lukas Jan 27, 2025
03468d0
Split agent_end episode into separate method
ondrej-lukas Jan 27, 2025
287966b
Add better logging
ondrej-lukas Jan 27, 2025
b8b27e9
remove old coordinator
ondrej-lukas Jan 27, 2025
a3665bd
Import from correct coordinator
ondrej-lukas Jan 27, 2025
54e76e7
Update real_world to use new game coordinator
ondrej-lukas Jan 27, 2025
2341059
Update imports so the class can be run
ondrej-lukas Jan 27, 2025
f8edaaa
Rename file
ondrej-lukas Jan 27, 2025
4d95b91
Remove old implementation of NSG
ondrej-lukas Jan 27, 2025
397b8e0
Changes in repo structure
ondrej-lukas Jan 27, 2025
3b569ec
Add project building files
ondrej-lukas Jan 27, 2025
968b224
add python verison
ondrej-lukas Jan 27, 2025
c4c355e
Fix absolute imports
ondrej-lukas Jan 27, 2025
46444c7
Add absolute imports
ondrej-lukas Jan 27, 2025
1249add
Add absolute imports
ondrej-lukas Jan 27, 2025
c1cd920
Fix typos
ondrej-lukas Jan 27, 2025
2c930e0
Fix import path
ondrej-lukas Jan 27, 2025
dd5b27e
Fix path
ondrej-lukas Jan 27, 2025
ee317b4
Update running intructions
ondrej-lukas Jan 27, 2025
a20648d
Updated project dependencies
ondrej-lukas Jan 27, 2025
705ef60
not needed
ondrej-lukas Jan 27, 2025
d51d204
Update installation instructions
ondrej-lukas Jan 27, 2025
cd2dd61
Correctly send the end reason
ondrej-lukas Jan 27, 2025
4298d6c
Default logging level =INFO
ondrej-lukas Jan 27, 2025
6fbd295
Add authors
ondrej-lukas Jan 27, 2025
9db563c
Fix imports
ondrej-lukas Jan 27, 2025
55eab53
Fix ruff errors
ondrej-lukas Jan 27, 2025
3546b82
remove unused dependencies for dev
ondrej-lukas Jan 27, 2025
5dfe600
removed unused import
ondrej-lukas Jan 27, 2025
dc16ec7
Fix imports
ondrej-lukas Jan 27, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
844 changes: 844 additions & 0 deletions AIDojoCoordinator/coordinator.py

Large diffs are not rendered by default.

File renamed without changes.
File renamed without changes.
11 changes: 6 additions & 5 deletions docs/Coordinator.md → AIDojoCoordinator/docs/Coordinator.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,8 @@ Coordinator is the centerpiece of the game orchestration. It provides an interfa
## Connction to other game components
Coordinator, having the role of the middle man in all communication between the agent and the world uses several queues for massing passing and handelling.

1. `Actions queue` is a queue in which the agents submit their actions. It provides N:1 communication channel in which the coordinator receives the inputs.
2. `Answer queue` is a separeate queue **per agent** in which the results of the actions are send to the agent.
3. `World action queue` is a queue used for sending the acions from coordinator to the AI Dojo world
4. `World response queue` is a channel used for wolrd -> coordinator communicaiton (responses to the agents' action)
<img src="/docs/figures/message_passing_coordinator.jpg" alt="Message passing overview" width="100%"/>
1. `Action queue` is a queue in which the agents submit their actions. It provides N:1 communication channel in which the coordinator receives the inputs.
2. `Answer queues` is a separeate queue **per agent** in which the results of the actions are send to the agent.


## Main components of the coordinator
Expand Down Expand Up @@ -45,3 +42,7 @@ Coordinator, having the role of the middle man in all communication between the
`self._agent_statuses`: status of each agent. One of AgentStatus
`self._agent_rewards`: dictionary of final reward of each agent in the current episod. Only agent's which can't participate in the ongoing episode are listed.
`self._agent_trajectories`: complete trajectories for each agent in the ongoing episode


## Episode
The episode starts with sufficient amount of agents registering in the game. Each agent role has a maximum allowed number of steps defined in the task configuration. An episode ends if all agents reach the goal
Loading
Loading