eval/progress.h
Go to the documentation of this file.
#ifndef EVAL_ML_PROGRESS_H
#define EVAL_ML_PROGRESS_H
#include "osl/progress.h"
#include "osl/eval/weights.h"
namespace osl
{
namespace eval
{
namespace ml
{
class ProgressBonus
{
public:
enum { DIM = 256 };
static int eval(Progress16 black, Progress16 white);
static void setUp(const Weights &weights);
private:
static int index(Progress16 black, Progress16 white)
{
return black.value() * 16 + white.value();
}
static CArray<int, 256> table;
};
class ProgressAttackDefense
{
public:
enum { DIM = 256 };
static int eval(Progress16 black_attack, Progress16 white_defense,
Progress16 white_attack, Progress16 black_defense);
static void setUp(const Weights &weights);
private:
static int index(Progress16 attack, Progress16 defense)
{
return attack.value() * 16 + defense.value();
}
static CArray<int, 256> table;
};
class ProgressAttackDefenseAll
{
public:
enum { DIM = 65536 };
static int eval(Progress16 black_attack,
Progress16 white_defense,
Progress16 white_attack, Progress16 black_defense);
static void setUp(const Weights &weights);
private:
static int index(Progress16 black_attack, Progress16 white_defense,
Progress16 white_attack, Progress16 black_defense)
{
return white_attack.value() +
16 * (black_defense.value() +
16 * (black_attack.value() * 16 + white_defense.value()));
}
static CArray<int, 65536> table;
};
}
}
}
#endif // EVAL_ML_PROGRESS_H
// ;;; Local Variables:
// ;;; mode:c++
// ;;; c-basic-offset:2
// ;;; End:
osl::CArray
Definition container.h:20
osl::eval::ml::ProgressAttackDefenseAll
Definition eval/progress.h:42
osl::eval::ml::ProgressAttackDefenseAll::DIM
@ DIM
Definition eval/progress.h:44
osl::eval::ml::ProgressAttackDefenseAll::table
static CArray< int, 65536 > table
Definition eval/progress.h:57
osl::eval::ml::ProgressAttackDefenseAll::setUp
static void setUp(const Weights &weights)
Definition eval_progress.cc:64
osl::eval::ml::ProgressAttackDefenseAll::index
static int index(Progress16 black_attack, Progress16 white_defense, Progress16 white_attack, Progress16 black_defense)
Definition eval/progress.h:50
osl::eval::ml::ProgressAttackDefense
Definition eval/progress.h:27
osl::eval::ml::ProgressAttackDefense::table
static CArray< int, 256 > table
Definition eval/progress.h:38
osl::eval::ml::ProgressAttackDefense::DIM
@ DIM
Definition eval/progress.h:29
osl::eval::ml::ProgressAttackDefense::index
static int index(Progress16 attack, Progress16 defense)
Definition eval/progress.h:34
osl::eval::ml::ProgressAttackDefense::setUp
static void setUp(const Weights &weights)
Definition eval_progress.cc:43
osl::eval::ml::ProgressBonus
Definition eval/progress.h:14
osl::eval::ml::ProgressBonus::table
static CArray< int, 256 > table
Definition eval/progress.h:24
osl::eval::ml::ProgressBonus::setUp
static void setUp(const Weights &weights)
Definition eval_progress.cc:11
osl::eval::ml::ProgressBonus::index
static int index(Progress16 black, Progress16 white)
Definition eval/progress.h:20
osl::eval::ml::ProgressBonus::DIM
@ DIM
Definition eval/progress.h:16
osl::progress::ProgressN::value
int value() const
Definition progress.h:22
osl::eval::ml
Definition eval_pieceStand.cc:470
osl::eval
Definition eval_pieceStand.cc:468
osl::progress::Progress16
ProgressN< 16 > Progress16
Definition progress.h:42
osl
Definition additionalEffect.h:6
progress.h
osl::eval::ml::Weights
Definition weights.h:18
weights.h