<commit_before>/*
 * Copyright (C) 2015 <NAME>
 * All rights reserved.
 */

#include <iostream>
#include <thread>
#include <chrono>
#include <random>

#include "stratlib/event.h"

constexpr char const* const RESET_C = "\x1b[0m";
constexpr char const* const RED_C = "\x1b[95m";
constexpr char const* const CLEAR_C = "\x1b[2J";

int main(int argc, char** argv) noexcept
{
  using namespace game;
  namespace chrono = std::chrono;

  auto const map_size = Vec<int>{35,35};

  auto prng = std::mt19937(std::random_device{}());
  auto dist = std::uniform_real_distribution<float>{0.0f, 2.5f};

  // Initialize, allocate, and populate the cost map.
  strat::Cost_Map cm; cm.allocate(map_size);
  for(int i = 0; i < cm.extents.y; ++i)
  {
    for(int j = 0; j < cm.extents.x; ++j)
    {
      // One second per square.
      cm.at({j,i}) = dist(prng);
    }
  }

  strat::Event_Map event_map;
  event_map.visited_map.allocate(map_size);
  event_map.event_timer_map.allocate(map_size);

  event_map.event_timer_map.at({0,0}).active = true;<commit_msg>Smaller distribution of costs to speed the simulation up.<commit_after>/*
 * Copyright (C) 2015 <NAME>
 * All rights reserved.
 */

#include <iostream>
#include <thread>
#include <chrono>
#include <random>

#include "stratlib/event.h"

constexpr char const* const RESET_C = "\x1b[0m";
constexpr char const* const RED_C = "\x1b[95m";
constexpr char const* const CLEAR_C = "\x1b[2J";

int main(int argc, char** argv) noexcept
{
  using namespace game;
  namespace chrono = std::chrono;

  auto const map_size = Vec<int>{35,35};

  auto prng = std::mt19937(std::random_device{}());
  auto dist = std::uniform_real_distribution<float>{0.0f, .9f};

  // Initialize, allocate, and populate the cost map.
  strat::Cost_Map cm; cm.allocate(map_size);
  for(int i = 0; i < cm.extents.y; ++i)
  {
    for(int j = 0; j < cm.extents.x; ++j)
    {
      // One second per square.
      cm.at({j,i}) = dist(prng);
    }
  }

  strat::Event_Map event_map;
  event_map.visited_map.allocate(map_size);
  event_map.event_timer_map.allocate(map_size);

  event_map.event_timer_map.at({0,0}).active = true;
{'fraction_non_alphanumeric': 0.15547205260685767, 'fraction_numerical': 0.025833724753405354, 'mean_word_length': 4.0, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 17, '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': '312738', 'n_tokens_mistral': 850, 'n_tokens_neox': 803, 'n_words': 193}