-
-
Notifications
You must be signed in to change notification settings - Fork 109
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add scrap * broken, but moving forward * tweaks * more tweaks * rough sketch now works * Add multiagent section * Try to get compilation to work * test passes * Drop file * format files * Fix random policy fix * fix indentation * add missing tags * Handle final state * Add sequential run function, drop seqenv * drop seqenv * Drop seq env * Fix iteration * Try adding multiagent hook * Multiplayer fixes * add export * Tests pass * Apply suggestions from code review Co-authored-by: Henri Dehaybe <47037088+HenriDeh@users.noreply.github.com> * add tests * add shortcut * Tweak tests * drop function * tests pass * tweak dispatch * expand tests * fix tests * Try new approach to players / iteration * Tweak iteration approach * drop current player iterator * Add MultiAgentRL to ci/cd * Add back CurrentPlayerIterator * Try next_player! interface * Fix test * call functions with player as argument * Fix reward function * Fix reward info * tests seem to pass... * fix ci * Fix cicd * fix cicd * fix import * update has changed action * fix gh action syntax * Add to CI * upgrade codecov to v3 * fix installation order * fix install order * RLEnv Tests pass * Fix env tests Rock/Paper/Scissors * Drop new package, add to RLCore * drop multiagent * Fix imports * add random policy support for multiagent * drop multi * fixes * Drop last traces of MultiAgent package * Add RLCore dep to RLEnvs * Fix env test errors * Move next_player! to RLBase * drop excess end * Index on board, not on env (so that current_player is not relevant after terminal state) * Fix things * Fix test * Fix reset! function * Expand tests * Expand tests * Fix tests * Relax hook req * Tweak tests * Fix loop / call * Fix test * Fix tests * Fix test * Env tests * add missing test * Fix incomplete test * fix test * Fix import error * Add more boilerplate tests, fix bug * Fix import * fix testset * Fix test * Add docstrings * Add docstring * Add multi-agent doc info * Namespace fix --------- Co-authored-by: Henri Dehaybe <47037088+HenriDeh@users.noreply.github.com>
- Loading branch information
1 parent
e2da341
commit 5143f60
Showing
22 changed files
with
624 additions
and
182 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
using ReinforcementLearningBase | ||
|
||
struct TestEnv <: RLBase.AbstractEnv | ||
state::Int | ||
end | ||
|
||
function RLBase.state(env::TestEnv, ::Observation{Any}, ::DefaultPlayer) | ||
return env.state | ||
end | ||
|
||
@testset "MultiAgent" begin | ||
@test MultiAgent(2) isa MultiAgent | ||
@test_throws ArgumentError MultiAgent(1) | ||
@test_throws ArgumentError MultiAgent(-1) | ||
end | ||
|
||
@testset "InformationSet" begin | ||
InformationSet() isa RLBase.AbstractStateStyle | ||
end | ||
|
||
@testset "InternalState" begin | ||
InternalState() isa RLBase.AbstractStateStyle | ||
end | ||
|
||
@testset "Observation" begin | ||
Observation() isa RLBase.AbstractStateStyle | ||
end | ||
|
||
@testset "EpisodeStyle" begin | ||
EpisodeStyle(TestEnv(10)) isa RLBase.AbstractEpisodeStyle | ||
end | ||
|
||
@testset "AbstractEnv" begin | ||
@test TestEnv(10) isa RLBase.AbstractEnv | ||
@test TestEnv(10) == TestEnv(10) | ||
@test Base.hash(TestEnv(10), UInt64(0)) == Base.hash(TestEnv(10), UInt64(0)) | ||
end | ||
|
||
@testset "players" begin | ||
@test simultaneous_player(TestEnv(10)) == SimultaneousPlayer() | ||
@test RLBase.players(TestEnv(10)) == (DefaultPlayer(),) | ||
end |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
include("base.jl") | ||
include("agent_srt_cache.jl") | ||
include("multi_agent.jl") |
File renamed without changes.
File renamed without changes.
Oops, something went wrong.