Browse Source

push version

adaptedStrategy0
Andrea Bellandi 10 years ago
parent
commit
af00345e00
1 changed files with 4 additions and 3 deletions
  1. +4
    -3
      src/Main.hs

+ 4
- 3
src/Main.hs View File

@ -1,3 +1,4 @@
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE ExistentialQuantification #-}
{-# OPTIONS -Wall #-}
@ -49,7 +50,7 @@ type Id = Int
type Seed = Int
strategies :: Game -> StdGen -> Maybe [Command] -> GameComputation
strategies g sgen cmd = [MkStrategyWrapper (initst g sgen cmd :: NullStrategy1)]
strategies g sgen cmd = [MkStrategyWrapper (initst g sgen cmd :: Strategy0)]
-- = [MkStrategyWrapper (initst g sgen cmd :: NullStrategy1),
-- MkStrategyWrapper (initst g sgen cmd :: NullStrategy2)]
@ -106,8 +107,8 @@ readFiles (x:xs) = do f <- BS.readFile x
iterategc :: [GameComputation] -> Maybe (Int,Int64) -> Maybe Int -> IO [(([Command], Int), Int)]
iterategc gcs tlimit mlimit = do rtl <- timeLimit tlimit
rml <- memLimit mlimit
(gcresult rtl rml)
rml <- memLimit mlimit
(gcresult rtl rml)
where
gcresult True _ = return best
gcresult _ True = return best


Loading…
Cancel
Save