created a very stupid player that plays random
moves
This commit is contained in:
parent
6fd9b15261
commit
2899820bcc
8
cpp/src/ais/v0_random.cpp
Normal file
8
cpp/src/ais/v0_random.cpp
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
#include "ai.hpp"
|
||||||
|
|
||||||
|
std::string ai::v1_simple::search(std::string pos, int depth) {
|
||||||
|
Board b = Board::setup_fen_position(pos);
|
||||||
|
std::vector<Move> moves = b.all_legal_moves();
|
||||||
|
|
||||||
|
return moves[rand() % moves.size()].to_string();
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user