<commit_before>module Config where

import Core.Math(clampToRange)
import qualified Debug.Trace as T
import Data.Maybe(fromMaybe)
import Hexagrid.Grid

--- input, defaults, and limits

maxShuffles = 200

data Input = Input {
    inputRadius :: Maybe Int,
    inputShuffles :: Maybe Int
}

thePositionEntropy = prandPositionEntropy
-- thePositionEntropy = scriptPositionEntropy

safeRadius :: Input -> Int
safeRadius input =
    let safe = clampToRange (1,5) . fromMaybe 5 . inputRadius $ input in
    T.trace ("input radius " ++ show (inputRadius input) ++ " -> " ++ show safe) $
        safe

safeShuffles :: Input -> Int
safeShuffles input =
    let safe = clampToRange (0,maxShuffles) . fromMaybe 10 . inputShuffles $ input in
    T.trace ("input shuffles " ++ show (inputShuffles input) ++ " -> " ++ show safe) $
    safe<commit_msg>raise max radius to 10, default shuffle to 50<commit_after>module Config where

import Core.Math(clampToRange)
import qualified Debug.Trace as T
import Data.Maybe(fromMaybe)
import Hexagrid.Grid

--- input, defaults, and limits

maxShuffles = 200
maxRadius = 10

data Input = Input {
    inputRadius :: Maybe Int,
    inputShuffles :: Maybe Int
}

thePositionEntropy = prandPositionEntropy
-- thePositionEntropy = scriptPositionEntropy

safeRadius :: Input -> Int
safeRadius input =
    let safe = clampToRange (1,maxRadius) . fromMaybe 6 . inputRadius $ input in
    T.trace ("input radius " ++ show (inputRadius input) ++ " -> " ++ show safe) $
        safe

safeShuffles :: Input -> Int
safeShuffles input =
    let safe = clampToRange (0,maxShuffles) . fromMaybe 60 . inputShuffles $ input in
    T.trace ("input shuffles " ++ show (inputShuffles input) ++ " -> " ++ show safe) $
    safe
{'fraction_non_alphanumeric': 0.10410641989589357, 'fraction_numerical': 0.013302486986697512, 'mean_word_length': 3.650537634408602, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, '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': '1721165', 'n_tokens_mistral': 549, 'n_tokens_neox': 523, 'n_words': 167}