<commit_before>/*
 * Copyright © 2012, United States Government, as represented by the
 * Administrator of the National Aeronautics and Space Administration.
 * All rights reserved.
 * 
 * The NASA Tensegrity Robotics Toolkit (NTRT) v1 platform is licensed
 * under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * http://www.apache.org/licenses/LICENSE-2.0.
 * 
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
 * either express or implied. See the License for the specific language
 * governing permissions and limitations under the License.
 */

/**
 * @file AppEscape_T6.cpp
 * @brief Contains the definition function main() for the Escape T6
 * application.
 * $Id$
 */

// This application
#include "Escape_T6Model.h"
#include "Escape_T6Controller.h"

// This library
#include "core/terrain/tgBoxGround.h"
#include "Crater.h"
#include "CraterDeep.h"
#include "core/tgModel.h"
#include "core/tgSimViewGraphics.h"
#include "core/tgSimulation.h"
#include "core/tgWorld.h"

// Bullet Physics
#include "LinearMath/btVector3.h"

// The C++ Standard Library
#include <iostream>

tgBoxGround *createGround();
tgWorld *createWorld();
tgSimViewGraphics *createGraphicsView(tgWorld *world);
tgSimView *createView(tgWorld *world);
void simulate(tgSimulation *simulation);

/**
 * Runs a series of episodes. 
 * Each episode tests a given control pattern for a given number of steps.
 * The fitness function (reward metric) for this experiment is 
 *     the maximum distance from the tensegrity's starting point 
 *     at any point during the episode
 * NB: Running episodes and using graphics are mutually exclusive features
 */
int main(int argc, char** argv)
{
    std::cout << "AppEscape_T6" << std::endl;

    // First create the world
    tgWorld *world = createWorld();

    // Second create the view
    tgSimViewGraphics *view = createGraphicsView(world); // For visual experimenting on one tensegrity
    //tgSimView       *view = createView(world);         // For running multiple episodes

    // Third create the simulation<commit_msg>Changed branch logic for SimView object selection<commit_after>/*
 * Copyright © 2012, United States Government, as represented by the
 * Administrator of the National Aeronautics and Space Administration.
 * All rights reserved.
 * 
 * The NASA Tensegrity Robotics Toolkit (NTRT) v1 platform is licensed
 * under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * http://www.apache.org/licenses/LICENSE-2.0.
 * 
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
 * either express or implied. See the License for the specific language
 * governing permissions and limitations under the License.
 */

/**
 * @file AppEscape_T6.cpp
 * @brief Contains the definition function main() for the Escape T6
 * application.
 * $Id$
 */

// This application
#include "Escape_T6Model.h"
#include "Escape_T6Controller.h"

// This library
#include "core/terrain/tgBoxGround.h"
#include "Crater.h"
#include "CraterDeep.h"
#include "core/tgModel.h"
#include "core/tgSimViewGraphics.h"
#include "core/tgSimulation.h"
#include "core/tgWorld.h"

// Bullet Physics
#include "LinearMath/btVector3.h"

// The C++ Standard Library
#include <iostream>

tgBoxGround *createGround();
tgWorld *createWorld();
tgSimViewGraphics *createGraphicsView(tgWorld *world);
tgSimView *createView(tgWorld *world);
void simulate(tgSimulation *simulation);

/**
 * Runs a series of episodes. 
 * Each episode tests a given control pattern for a given number of steps.
 * The fitness function (reward metric) for this experiment is 
 *     the maximum distance from the tensegrity's starting point 
 *     at any point during the episode
 * NB: Running episodes and using graphics are mutually exclusive features
 */
int main(int argc, char** argv)
{
    std::cout << "AppEscape_T6" << std::endl;

    // First create the world
    tgWorld *world = createWorld();

    // Second create the view
    #if(0)
    tgSimViewGraphics *view = createGraphicsView(world); // For visual experimenting on one tensegrity
    #else
    tgSimView       *view = createView(world);         // For running multiple episodes
    #endif
    
    // Third create the simulation
{'fraction_non_alphanumeric': 0.09240994854202401, 'fraction_numerical': 0.0066466552315608916, 'mean_word_length': 3.973347547974414, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '660287', 'n_tokens_mistral': 1342, 'n_tokens_neox': 1291, 'n_words': 524}