<commit_before>module Wumpus where

import Control.Lens
import qualified Data.Map as M
import Data.MList
import World.Read
import World.Statistics
import Types
import World

main :: IO ()
main = do
   (world, wmi) <- readWorld "world2"
   --world `seq` putStrLn "WumpusWorld!"
   --print $ M.size $ world ^. cellData
   print wmi
   putStrLn $ showStats $ mkStats wmi world
   putStrLn "--------"
   ((resWorld, worldStats):_) <- fromMList $ takeM 10 (runWorld wmi world)
   putStrLn $ showStats worldStats
   putStrLn (replicate 40 '-')
   return ()<commit_msg>Added main' function with which one can select the world.<commit_after>module Wumpus where

import Control.Lens
import qualified Data.Map as M
import Data.MList
import World.Read
import World.Statistics
import Types
import World

main' :: String -> IO ()
main' w = do
   (world, wmi) <- readWorld w
   --world `seq` putStrLn "WumpusWorld!"
   --print $ M.size $ world ^. cellData
   print wmi
   putStrLn $ showStats $ mkStats wmi world
   putStrLn "--------"
   ((resWorld, worldStats):_) <- fromMList $ takeM 10 (runWorld wmi world)
   putStrLn $ showStats worldStats
   putStrLn (replicate 40 '-')
   return ()

main :: IO ()
main = main' "world4"
{'fraction_non_alphanumeric': 0.11716171617161716, 'fraction_numerical': 0.00825082508250825, 'mean_word_length': 3.3633093525179856, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6284601', 'n_tokens_mistral': 414, 'n_tokens_neox': 401, 'n_words': 134}