From 7e25735e875662297540d6505afdaa4e0aeb8770 Mon Sep 17 00:00:00 2001 From: Slash Date: Sun, 9 Aug 2015 03:30:28 +0200 Subject: [PATCH] damn2 --- src/Strategy0.hs | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/Strategy0.hs b/src/Strategy0.hs index 816a93f..aaa2554 100644 --- a/src/Strategy0.hs +++ b/src/Strategy0.hs @@ -1,5 +1,3 @@ -{-# OPTIONS -Wall #-} - module Strategy0 where import qualified Data.PQueue.Prio.Max as PQ @@ -9,22 +7,19 @@ import Datatypes.Game (Command(..)) import qualified Datatypes.Game as Game import VM -import Debug.Trace (trace) - commandsList :: [Command] commandsList = [MoveSE, MoveSW, MoveW, MoveE] type Queue = PQ.MaxPQueue Int Game strat0 :: Game -> ([Command],Int) -strat0 game | trace (show game) False = undefined strat0 game = let firstQueue = PQ.singleton (Game.score game) game (incomplete, completed) = findBest maxIter firstQueue [] (_, bestIncomplete) = PQ.findMax incomplete resultGame = findListMax (bestIncomplete:completed) - in trace (show resultGame) (reverse (Game.history resultGame), Game.score resultGame) + in (reverse (Game.history resultGame), Game.score resultGame) where - maxIter = 30000 + maxIter = 50000 findListMax :: [Game] -> Game findListMax (x:xs) = innerFindListMax x xs where