diff --git a/flake.lock b/flake.lock index 84bc2a5..139afc4 100644 --- a/flake.lock +++ b/flake.lock @@ -2,17 +2,17 @@ "nodes": { "nixpkgs": { "locked": { - "lastModified": 1655624069, - "narHash": "sha256-7g1zwTdp35GMTERnSzZMWJ7PG3QdDE8VOX3WsnOkAtM=", + "lastModified": 1713145326, + "narHash": "sha256-m7+IWM6mkWOg22EC5kRUFCycXsXLSU7hWmHdmBfmC3s=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "0d68d7c857fe301d49cdcd56130e0beea4ecd5aa", + "rev": "53a2c32bc66f5ae41a28d7a9a49d321172af621e", "type": "github" }, "original": { "owner": "NixOS", "repo": "nixpkgs", - "rev": "0d68d7c857fe301d49cdcd56130e0beea4ecd5aa", + "rev": "53a2c32bc66f5ae41a28d7a9a49d321172af621e", "type": "github" } }, diff --git a/flake.nix b/flake.nix index 51509eb..b8802f6 100644 --- a/flake.nix +++ b/flake.nix @@ -2,8 +2,7 @@ description = "Flake for haga"; inputs = { nixpkgs.url = - # 2022-06-22 - "github:NixOS/nixpkgs/0d68d7c857fe301d49cdcd56130e0beea4ecd5aa"; + "github:NixOS/nixpkgs/53a2c32bc66f5ae41a28d7a9a49d321172af621e"; }; @@ -14,10 +13,12 @@ # defaultPackage.${system} = haskellPackages.callPackage ./default.nix { }; devShell.${system} = mkShell { buildInputs = [ + haskell.compiler.ghc981 + git + gcc + gmp feedgnuplot - haskellPackages.cabal-install - haskellPackages.ormolu - haskell.compiler.ghc8107 + stack ]; }; }; diff --git a/haga.cabal b/haga.cabal index f9fd041..6076d99 100644 --- a/haga.cabal +++ b/haga.cabal @@ -49,8 +49,8 @@ library , Pretty , Szenario191 , LambdaCalculus - , GermanDataset - , GermanData + , NurseryDataset + , NurseryData , Utils executable haga build-depends: base @@ -83,8 +83,8 @@ executable haga , Pretty , Szenario191 , LambdaCalculus - , GermanDataset - , GermanData + , NurseryDataset + , NurseryData , Utils executable haga-test @@ -119,6 +119,6 @@ executable haga-test , Pretty , Szenario191 , LambdaCalculus - , GermanDataset - , GermanData + , NurseryDataset + , NurseryData , Utils diff --git a/src/Main.hs b/src/Main.hs index 11ecf94..b97baa4 100644 --- a/src/Main.hs +++ b/src/Main.hs @@ -9,7 +9,7 @@ import Protolude hiding (for) import System.IO -- import Szenario212Pun -- import Szenario191 -import GermanDataset +import NurseryDataset import Debug.Trace as DB import qualified Data.Map.Strict as Map @@ -51,19 +51,19 @@ main :: IO () main = execParser optionsWithHelp >>= \opts -> do hSetBuffering stdout NoBuffering - germanLEE <- shuffledGermanLEE - let env = germanLE + nurseryLEE <- shuffledNurseryLEE + let env = nurseryLE let selType = Tournament 3 - let run' = run germanLEE env selType 80 (5 / 100) (populationSize opts) (steps (iterations opts)) + let run' = run nurseryLEE env selType 80 (5 / 100) (populationSize opts) (steps (iterations opts)) pop' <- runEffect (for run' logCsv) - germanLEE' <- calc germanLEE pop' - let (res, _) = bests germanLEE' 5 pop' - let germanLEE' = germanLEE {training = False} - germanLEE' <- calc germanLEE' res - mapM_ (format germanLEE') res + nurseryLEE' <- calc nurseryLEE pop' + let (res, _) = bests nurseryLEE' 5 pop' + let nurseryLEE' = nurseryLEE {training = False} + nurseryLEE' <- calc nurseryLEE' res + mapM_ (format nurseryLEE') res where - format germanL s = do - let f = fitness' germanL s + format nurseryL s = do + let f = fitness' nurseryL s putErrText $ show f <> "\n" <> pretty s logCsv = putText . csv csv (t, f) = show t <> " " <> show f