<commit_before>import search
from math import(cos, pi)

sumner_map = search.UndirectedGraph(dict(
    Portland=dict(Mitchellville=7, Fairfield=17, Cottontown=18),
    Cottontown=dict(Portland=18),
    Fairfield=dict(Mitchellville=21, Portland=17),
    Mitchellville=dict(Portland=7, Fairfield=21),
))

sumner_puzzle = search.GraphProblem('Cottontown', 'Mitchellville', sumner_map)

sumner_puzzle.description = '''
An abbreviated map of Sumner County, TN.
This map is unique, to the best of my knowledge.
'''

myPuzzles = [
    sumner_puzzle,
]<commit_msg>Keep forgetting to commit my work often, but I finally got a map that returns DFS < BFS < UCS in terms of point cost!<commit_after>import search
from math import(cos, pi)

# A sample map problem
sweden_map = search.UndirectedGraph(dict(
    Stockholm=dict(Uppsala=71, Umeå=637, Malmö=271),
    Gothenburg=dict(Örebro=218, Östersund=779, Stockholm=471, Lund=264),
    Malmö=dict(Gothenburg=271, Örebro=502, Helsingborg=64, Lund=19),
    Uppsala=dict(Umeå=571, Stockholm=72),
    Örebro=dict(Stockholm=202, Linköping=122, Umeå=701),
    Linköping=dict(Stockholm=200, Uppsala=265, Norrköping=42, Lund=409),
    Helsingborg=dict(Gothenburg=215, Stockholm=556, Linköping=360),
    Jönköping=dict(Örebro=213, Stockholm=324, Norrköping=167),
    Norrköping=dict(Stockholm=163, Umeå=795, Linköping=42),
    Lund=dict(Stockholm=601, Malmö=19, Umeå=1236),
    Umeå=dict(Östersund=363, Stockholm=639),
    Östersund=dict(Umeå=363, Gothenburg=779, Lund=1156),
))

sweden_puzzle = search.GraphProblem('Malmö', 'Umeå', sweden_map)

sweden_puzzle.label = 'Map of Sweden'
sweden_puzzle.description = '''
An abbreviated map of Sweden.
'''

# A trivial Problem definition
class LightSwitch(search.Problem):
    def actions(self, state):
        return ['up', 'down']

    def result(self, state, action):
        if action == 'up':
            return 'on'
        else:
            return 'off'

    def goal_test(self, state):
        return state == 'on'

    def h(self, node):
        state = node.state
        if self.goal_test(state):
            return 0
        else:
            return 1

switch_puzzle = LightSwitch('off')
switch_puzzle.label = 'Light Switch'

myPuzzles = [
    sweden_puzzle,
    switch_puzzle,
]
{'fraction_non_alphanumeric': 0.1237842617152962, 'fraction_numerical': 0.053934571175950484, 'mean_word_length': 4.324705882352941, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, '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': '5262286', 'n_tokens_mistral': 918, 'n_tokens_neox': 806, 'n_words': 175}