forked from Kaixhin/Atari
-
Notifications
You must be signed in to change notification settings - Fork 0
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
4 changed files
with
68 additions
and
65 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,22 @@ | ||
local Setup = require 'Setup' | ||
local ExperienceReplay = require 'ExperienceReplay' | ||
local Master = require 'Master' | ||
local AsyncMaster = require 'async/AsyncMaster' | ||
|
||
-- Parse options and perform setup | ||
local setup = Setup(arg) | ||
local opt = setup.opt | ||
|
||
-- Start master experiment runner | ||
if opt.async then | ||
log.info(opt) | ||
local master = AsyncMaster(opt) | ||
master:start() | ||
|
||
master:start() -- TODO: Use same API as normal master | ||
else | ||
local experienceReplay = ExperienceReplay(opt) | ||
local master = Master(opt) | ||
|
||
if opt.mode == 'train' then | ||
experienceReplay:train() | ||
|
||
master:train() | ||
elseif opt.mode == 'eval' then | ||
experienceReplay:evaluate() | ||
|
||
master:evaluate() | ||
end | ||
|
||
end | ||
end |