|
@ -17,7 +17,7 @@ import Data.Maybe |
|
|
|
|
|
|
|
|
import StrategyManager |
|
|
import StrategyManager |
|
|
import Strategy0 |
|
|
import Strategy0 |
|
|
import Datatypes.Game(Game,Command) |
|
|
|
|
|
|
|
|
import Datatypes.Game(Game,Command,commandsToString) |
|
|
import VM |
|
|
import VM |
|
|
import Opt |
|
|
import Opt |
|
|
import JSONDeser(readInput) |
|
|
import JSONDeser(readInput) |
|
@ -76,7 +76,7 @@ main = do initTime <- secTime |
|
|
initialData <- createComputationsFromFiles files rng powerPhrase |
|
|
initialData <- createComputationsFromFiles files rng powerPhrase |
|
|
let (_, _,gameComputations) = unzip3 initialData |
|
|
let (_, _,gameComputations) = unzip3 initialData |
|
|
commandResults <- iterateGame gameComputations (timeStruct maxTime initTime) maxMem |
|
|
commandResults <- iterateGame gameComputations (timeStruct maxTime initTime) maxMem |
|
|
let stringResults = map (\(cmds,score,algoIdx) -> (cmdToString cmds,score,algoIdx)) commandResults |
|
|
|
|
|
|
|
|
let stringResults = map (\(cmds,score,algoIdx) -> (commandsToString cmds,score,algoIdx)) commandResults |
|
|
let outJSONstructs = zipWith jsonBuilder initialData stringResults |
|
|
let outJSONstructs = zipWith jsonBuilder initialData stringResults |
|
|
BS.putStrLn $ encode outJSONstructs |
|
|
BS.putStrLn $ encode outJSONstructs |
|
|
writeLogFile logFile (zipWith logFileBuilder initialData stringResults) |
|
|
writeLogFile logFile (zipWith logFileBuilder initialData stringResults) |
|
|