My Project
obftest.c File Reference

Testing Edax from Othello Board Files (OBF). More...

#include "search.h"
#include "options.h"
#include "const.h"
#include "settings.h"

Go to the source code of this file.

Classes

struct  OBF
 

Typedefs

typedef struct OBF OBF
 

Enumerations

enum  { OBF_PARSE_OK , OBF_PARSE_SKIP , OBF_PARSE_END }
 

Functions

void obf_free (OBF *obf)
 Free an OBF structure.
 
static void obf_write (OBF *obf, FILE *f)
 Write an OBF structure.
 
static int obf_read (OBF *obf, FILE *f)
 Read an OBF structure.
 
static void obf_search (Search *search, OBF *obf, int n)
 Analyze an OBF structure.
 
static void obf_build (Search *search, OBF *obf, int n)
 Build an OBF structure.
 
void obf_test (Search *search, const char *obf_file, const char *wrong_file)
 Test an OBF file.
 
void script_to_obf (Search *search, const char *script_file, const char *obf_file)
 Build an OBF file from a Script file.
 
void obf_filter (const char *input_file, const char *output_file)
 Select hard position from an OBF file.
 
void _obf_speed (Search *search, const int n, BenchResult *result)
 Test edax speed by running for at least 1 minutes on problems deeper and deeper.
 
void obf_speed (Search *search, const int n)
 

Detailed Description

Testing Edax from Othello Board Files (OBF).

An Othello Board File has the following format:

  • A single position per line.
  • Any text following the percent symbol % is a comment.
  • A position is a set of fields, each field is terminated by a semi-colon ;.
  • The first field describes the Othello board.
  • The other fields contain all the playable moves with their score, separated by a colon: 'move':'score'.
Date
1998 - 2017
Author
Richard Delorme
Version
4.4

Typedef Documentation

◆ OBF

typedef struct OBF OBF

OBF structure: Othello Board File

Enumeration Type Documentation

◆ anonymous enum

anonymous enum

OBF parse status

Enumerator
OBF_PARSE_OK 
OBF_PARSE_SKIP 
OBF_PARSE_END 

Function Documentation

◆ _obf_speed()

void _obf_speed ( Search * search,
const int n,
BenchResult * result )

Test edax speed by running for at least 1 minutes on problems deeper and deeper.

Parameters
searchSearch.

◆ obf_build()

static void obf_build ( Search * search,
OBF * obf,
int n )
static

Build an OBF structure.

Parameters
searchSearch.
obfOBF structure.
nposition number.

◆ obf_filter()

void obf_filter ( const char * input_file,
const char * output_file )

Select hard position from an OBF file.

Parameters
input_fileOBF file.
output_fileFiltered OBF file.

◆ obf_free()

void obf_free ( OBF * obf)

Free an OBF structure.

Parameters
obfOBF structure.

◆ obf_read()

static int obf_read ( OBF * obf,
FILE * f )
static

Read an OBF structure.

Parameters
obfOBF structure.
fInput stream.
Returns
Parsing status.

◆ obf_search()

static void obf_search ( Search * search,
OBF * obf,
int n )
static

Analyze an OBF structure.

Parameters
searchSearch.
obfOBF structure.
nposition number.

◆ obf_speed()

void obf_speed ( Search * search,
const int n )

◆ obf_test()

void obf_test ( Search * search,
const char * obf_file,
const char * wrong_file )

Test an OBF file.

Parameters
searchSearch.
obf_fileOBF file.
wrong_fileOBF file with position wrongly analyzed.

◆ obf_write()

static void obf_write ( OBF * obf,
FILE * f )
static

Write an OBF structure.

Parameters
obfOBF structure.
fOutput stream.

◆ script_to_obf()

void script_to_obf ( Search * search,
const char * script_file,
const char * obf_file )

Build an OBF file from a Script file.

Parameters
searchSearch.
script_filefile with a set of position.
obf_fileOBF file.