neet 0.2.0.0 → 0.2.0.1
raw patch · 3 files changed
+8/−3 lines, 3 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- neet.cabal +1/−1
- src/Neet/Examples/XOR.hs +2/−1
- src/Neet/Genome.hs +5/−1
neet.cabal view
@@ -2,7 +2,7 @@ -- see http://haskell.org/cabal/users-guide/ name: neet-version: 0.2.0.0+version: 0.2.0.1 synopsis: A NEAT library for Haskell -- description: homepage: https://github.com/raymoo/NEET
src/Neet/Examples/XOR.hs view
@@ -88,7 +88,8 @@ _ <- getLine putStrLn "Running XOR experiment with 150 population and default parameters" seed <- randomIO- let pop = newPop seed (PS 150 2 1 defParams (Just 2))+ let pop = newPop seed (PS 150 2 1 defParams { distParams = dp } Nothing)+ dp = defDistParams { delta_t = 5 } (pop', sol) <- xorLoop pop printInfo pop' putStrLn $ "Solution found in generation " ++ show (popGen pop')
src/Neet/Genome.hs view
@@ -421,7 +421,11 @@ weightDiffs = differences conns1 conns2 - weightFactor = IM.foldl (+) 0 weightDiffs / fromIntegral (IM.size weightDiffs)+ weightsSize = IM.size weightDiffs++ weightFactor+ | weightsSize > 0 = IM.foldl (+) 0 weightDiffs / fromIntegral weightsSize+ | otherwise = 0 ids1 = IM.keysSet conns1