<commit_before>#include "world.h"

#include "../core/console.h"
#include "../core/content.h"
#include "../util/mathutils.h"
#include "../util/log.h"

#include "cell.h"
#include "food.h"
#include "water.h"

#include <sstream>
#include <iostream>

NeuralNetwork* World::m_neuralNetwork = 0;
uint32 World::m_weightCount = 0;

// 8192.0f
World::World() :
    m_radius(2048.0f),
    m_spatialHash(m_radius),
    m_debug(false)
{
    std::cout << "world ctor" << std::endl;

    // TODO (Tyler): Fine tune the hidden nodes.
    m_neuralNetwork = new NeuralNetwork(11, 8, 4);
    m_weightCount = m_neuralNetwork->getWeightCount();
}

World::~World()
{
    std::cout << "world dtor" << std::endl;

    if (m_neuralNetwork)
        delete m_neuralNetwork;

    m_neuralNetwork = 0;
}

bool World::initialize()
{
    m_border.setRadius(m_radius);
    m_border.setOrigin(m_radius, m_radius);
    m_border.setFillColor(sf::Color(32, 32, 32, 255));
    m_border.setOutlineColor(sf::Color(128, 128, 128, 255));<commit_msg>Minor formatting in the world class.<commit_after>#include "world.h"

#include "../core/console.h"
#include "../core/content.h"
#include "../util/mathutils.h"
#include "../util/log.h"

#include "cell.h"
#include "food.h"
#include "water.h"

#include <sstream>

NeuralNetwork* World::m_neuralNetwork = 0;
uint32 World::m_weightCount = 0;

// 8192.0f
World::World() :
    m_radius(2048.0f),
    m_spatialHash(m_radius),
    m_debug(false)
{
    // TODO (Tyler): Fine tune the hidden nodes.
    m_neuralNetwork = new NeuralNetwork(11, 8, 4);
    m_weightCount = m_neuralNetwork->getWeightCount();
}

World::~World()
{
    if (m_neuralNetwork)
        delete m_neuralNetwork;

    m_neuralNetwork = 0;
}

bool World::initialize()
{
    m_border.setRadius(m_radius);
    m_border.setOrigin(m_radius, m_radius);
    m_border.setFillColor(sf::Color(32, 32, 32, 255));
    m_border.setOutlineColor(sf::Color(128, 128, 128, 255));
{'fraction_non_alphanumeric': 0.16692586832555728, 'fraction_numerical': 0.041472265422498704, 'mean_word_length': 4.065616797900263, 'pattern_counts': {'":': 0, '<': 14, '<?xml version=': 0, '>': 8, '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': '629422', 'n_tokens_mistral': 797, 'n_tokens_neox': 727, 'n_words': 140}