Skip to content
Snippets Groups Projects
Commit a6f517f3 authored by Salard Xavier's avatar Salard Xavier
Browse files

Delete penguin_heuristic.cpp.orig

parent a8ecd6b4
No related branches found
No related tags found
No related merge requests found
#include "penguin_heuristic.hpp"
#include "penguin.hpp"
using namespace std;
namespace mcts
{
float penguin_heuristic::get_value(const game::penguin& game, uint8_t move) const
{
return 0.f;
}
int penguin_heuristic::get_count(const game::penguin& game, uint8_t move) const
{
return 1;
}
float go_left_up_heuristic::get_value(const game::penguin& game, uint8_t move) const
{
<<<<<<< HEAD
std::shared_ptr<game::penguin> played = game::copy(game);
played->play(move);
game::penguin_state state = played->get_state();
uint32_t* penguins = state.peng_blue;
if(!state.current_player_red) {
penguins = state.peng_red;
}
uint32_t sPos = 0;
for(int i=0; i< 4; i++) {
sPos+=PENGUIN_POS(penguins[i]);
}
double res = (double) (-(-118.0 + sPos) / 118.0);
return res;
=======
std::shared_ptr<game::penguin> played = game::copy(game);
played->play(move);
game::penguin_state state = played->get_state();
uint32_t* penguins = state.peng_blue;
if(!state.current_player_red) {
penguins = state.peng_red;
}
uint32_t sPos = 0;
for(int i=0; i< 4; i++) {
sPos+=PENGUIN_POS(penguins[i]);
}
double res = (double) (-(-118.0 + sPos) / 118.0);
return res;
>>>>>>> 34412ade6e5941a3c916b90b915655977cb2068c
}
int go_left_up_heuristic::get_count(const game::penguin& game, uint8_t move) const
{
return 100000000;
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment