- Main Page
- Classes
- Files

# LookUpTable.h

    00001 /*
    00002 * Neural Networks Tearm Project
    00003 * Martin Johne
    00004 * 04.10.2006
    00005 */
    00006 #pragma once
    00007 #include <irrlicht.h>
    00008 #include "Symmetry.h"
    00009
    00011 class CLookUpTable
    00012 {
    00013 public:
    00014
    00015         // methods
    00016
    00017         CLookUpTable();
    00018         ~CLookUpTable(void);
    00019
    00021         void learn();
    00023         double getStateValue(char *pBoard);
    00025         int getBestMove(char *pBoard, char player);
    00026
    00027         // variables
    00028
    00029         irr::core::array<unsigned long> lookUpTableStates;
    00030         irr::core::array<double> lookUpStateValues;
    00031
    00032 private:
    00033
    00034         //methods
    00035
    00036         void createTables();
    00037         inline unsigned long reduceBoardToLong(const char *pBoard);
    00038
    00039         // variables
    00040
    00041         int boardSizeX, boardSizeY, boardSizeZ;
    00042         int winFieldCount;
    00043         int boardFieldsCount;
    00044         CSymmetry *pSymmetry;
    00045         char *pBoard;
    00046
    00047 };