<commit_before>#include <iostream>
#include <string>
#include <sstream>
#include <cgo/montecarlo/montecarlo_agent.hpp>

using namespace cgo::base;
using namespace cgo::standardin;

MonteCarloAgent::MonteCarloAgent(Marker marker) :
   Agent(marker)
{}

/* virtual */ MonteCarloAgent::~MonteCarloAgent() {}

Move MonteCarloAgent::makeMove(State& state,
 const boost::optional< std::tuple< Move, State > >& predecessor) {
   Position position(-1, -1);

   do {
      std::cout << "Enter a move: <row> <col> or (p)ass: ";

      std::string move;
      do {
         std::getline(std::cin, move);
      } while (move.size() == 0);

      if (move == "p" || move == "pass") {
         return Pass();
      }

      int row, col;
      std::stringstream ss(move);
      ss >> row >> col;

      position = Position(row - 1, col - 1);
   } while (!state.isActionValid(Action(this->_marker, position), predecessor));

   return Action(this->_marker, position);
}<commit_msg>updating montecarlo<commit_after>#include <iostream>
#include <string>
#include <sstream>
#include <cgo/montecarlo/montecarlo_agent.hpp>

using namespace cgo::base;
using namespace cgo::standardin;

MonteCarloAgent::MonteCarloAgent(Marker marker) :
   Agent(marker)
{}

/* virtual */ MonteCarloAgent::~MonteCarloAgent() {}

int MonteCarloAgent::CalculateBest(Position position) {

}

Move MonteCarloAgent::makeMove(State& state,
 const boost::optional< std::tuple< Move, State > >& predecessor) {
   Position position(-1, -1);

   // do {
   //    std::cout << "Enter a move: <row> <col> or (p)ass: ";

   //    std::string move;
   //    do {
   //       std::getline(std::cin, move);
   //    } while (move.size() == 0);

   //    if (move == "p" || move == "pass") {
   //       return Pass();
   //    }

   //    int row, col;
   //    std::stringstream ss(move);
   //    ss >> row >> col;

   //    position = Position(row - 1, col - 1);
   // } while (!state.isActionValid(Action(this->_marker, position), predecessor));



   return Action(this->_marker, position);
}
{'fraction_non_alphanumeric': 0.1743388834476004, 'fraction_numerical': 0.004897159647404506, 'mean_word_length': 3.1950718685831623, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 31, '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': '1194650', 'n_tokens_mistral': 703, 'n_tokens_neox': 678, 'n_words': 154}