Skip to content
Snippets Groups Projects
Commit 8623f7f0 authored by Pizon Antoine's avatar Pizon Antoine
Browse files

Changed save file to .csv and added Keras folder

parent c912fe1c
No related branches found
No related tags found
No related merge requests found
......@@ -39,7 +39,7 @@ test_mcts_two_players<Game>::test_mcts_two_players(const Game& g, const heuristi
{
game::config& config = game::config::get_config();
savefile.open("save/save.txt", std::ios::app);
savefile.open("save/save.csv", std::ios::app);
if(config.is_ai_vs_ai())
{
......@@ -88,7 +88,7 @@ template <typename Game>
void test_mcts_two_players<Game>::save_board(const Game& game, int move){
std::shared_ptr<game::penguin> g = game::copy(game);
game::penguin_state state = g->get_state();
savefile << state.one_fish << " " << state.two_fish << " " << state.three_fish << " " << g->penguin_board(false) << " " << g->penguin_board(true) << " " << move << std::endl;
savefile << state.one_fish << ";" << state.two_fish << ";" << state.three_fish << ";" << g->penguin_board(false) << ";" << g->penguin_board(true) << ";" << move << std::endl;
}
template <typename Game>
......@@ -231,7 +231,7 @@ void test_mcts_two_players<Game>::self_play(Game g, const heuristic<Game>& h1, c
for (unsigned int i = 0; i < c.get_game_count(); ++i)
{
//std::cout << i << std::endl;
savefile << 0 << std::endl;
savefile << "0;0;0;0;0;0" << std::endl;
if(i%2 == 0)
{
state = game::penguin::random_start_state();
......
#!/usr/bin/python
from keras.models import Sequential
from keras.layers import Dense
import numpy
seed = 7
numpy.random.seed(seed)
Keras/numpy 0 → 100644
This diff is collapsed.
0;0;0;0;0;0
535368492349450263;581484495112372960;36068517145023752;330240;137441050888;39274
535368492349450263;581484495112372960;36068517144958216;1099511892480;137441050888;32
535368492349450263;581484495112372960;36068517144958208;1099511892480;35321813139712;2
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