Page 7 of 7

Re: IvanHoe 999946 Beta

Posted: Mon Jan 16, 2012 5:58 am
by kingliveson
Komodo 4 really exposed inefficiency of IvanHoe's clock. The adjustment below is an improvement attempt without much deviation.
void TimeManager (sint64 TIME, sint64 OPP_TIME, sint64 INCREMENT, int mtg)
{  
  double rat;

  if (mtg)
  {
    if (mtg > 25)
      mtg = 25;

    DESIRED_TIME = TIME  / mtg + INCREMENT;

    ABSOLUTE_TIME = (TIME * mtg) / (4 * mtg - 3) - MIN (1000000, TIME / 10);
    if (mtg == 1)
      ABSOLUTE_TIME -= MIN (1000000, ABSOLUTE_TIME / 10);

    if (ABSOLUTE_TIME < 1000) /* porque? */
      ABSOLUTE_TIME = 1000;
  }
  else
  {
    ABSOLUTE_TIME = (TIME * ABSOLUTE_PERCENT) / 100 - 10000;

    if (ABSOLUTE_TIME < 1000)
      ABSOLUTE_TIME = 1000;

    DESIRED_TIME = (TIME * DESIRED_MILLIS) / 1000 + INCREMENT;
  }

  if (SINCE_NEW_GAME < BOOK_EXIT_MOVES)
    DESIRED_TIME += (DESIRED_TIME * (BOOK_EXIT_MOVES - SINCE_NEW_GAME)) / BOOK_EXIT_MOVES;

#if 1

  if (!BUFFER_TIME && !INCREMENT) BUFFER_TIME = 3000;

  if (DESIRED_TIME_FLAG)
  {
    rat = ((double) (TIME + 1)) / ((double) (OPP_TIME + 1));

    if (rat < 0.95)
      DESIRED_TIME -= (DESIRED_TIME >> 2) + DESIRED_TIME >> 2;
    else if (rat > 1.25)
      DESIRED_TIME += (DESIRED_TIME >> 2) + DESIRED_TIME >> 2;

    DESIRED_TIME_FLAG = 0;
  }
  else
    DESIRED_TIME_FLAG = 1;
  
#endif

  if (DESIRED_TIME > ABSOLUTE_TIME)
    DESIRED_TIME = ABSOLUTE_TIME;
  if (DESIRED_TIME < 1000)
    DESIRED_TIME = 1000;
  EASY_TIME = (DESIRED_TIME * EASY_FACTOR) / 100;
  if (UCI_PONDER)
    EASY_TIME = (DESIRED_TIME * EASY_FACTOR_PONDER) / 100;
  BATTLE_TIME = (DESIRED_TIME * BATTLE_FACTOR) / 100;
  ORDINARY_TIME = (DESIRED_TIME * ORDINARY_FACTOR) / 100;
}
main():

Code: Select all

DESIRED_TIME_FLAG = 0;
EASY_FACTOR_PONDER = 30;
ORDINARY_FACTOR = 70;
RobboLito.h:

Code: Select all

int  DESIRED_TIME_FLAG;
UCI time management parameters can be removed and enabled for debugging mode only. The engine already has more than enough options which cause problems for small resolution displays on buggy Fritz GUI. Free ChessGUI is better for engine match/tournament anyways and does not have issue with rich UCI options. Arena which is good for analyzing, does not mind many parameters either. Anyhow, I think this was a huge waste of time. ;)



Edit

Forgot to mention builds using the updated clock was uploaded yesterday with the following md5sum signatures:

d733aa5e23f51e42a98863653da7d001 IvanHoe999946h.7z

Code: Select all

12ed94b63342bec0062c74220dfd121b  ./Android/IvanHoe999946h
767887241faec364568e1b0e854dece2  ./Linux/Mode_Game_Play/x86-64/IvanHoe999946h
69ef5166dcf987299c14e755d7efd82f  ./Linux/Mode_Game_Play/x86-32/IvanHoe999946h
83f703facb138175eef62e281d690b8a  ./Windows/Mode_Game_Play/x86-64/IvanHoe999946h.exe
3754454bb784e180b098f49fef4cff38  ./Windows/Mode_Game_Play/x86-32/IvanHoe999946h.exe
e1fad6e7d42e96d70687c121cf895e6c  ./Help.pdf
For version 999946f (Linux), the 64-bit version was built with ICC, and 32-bit, GCC, and while Windows builds are ICC and MSVC respectively. Previous 999946h build uses GCC for both 64/32 bit builds, and there was no change for Windows. The current 999946h uses ICC for 32-bit/64-bit builds for both operating systems.

Regarding Linux builds and glibc incompatibility, it could be built statically linked, but RobboBases will not work for 999946. This is because "Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking." It won't work. The alternative is to build static (.a) RobboBases library, then use "STATIC_LINKERY" option in the source, and finally link it against IvanHoe during compile. There are issues however with multiple re-definitions that needs fixing.

Re: IvanHoe 999946 Beta

Posted: Thu Jan 19, 2012 8:20 am
by Howard E
Ivanhoe does not work for me in analysis mode.
What can I do to remedy this? Thanks in advance.

Re: IvanHoe 999946 Beta

Posted: Thu Jan 19, 2012 6:23 pm
by kingliveson
Howard E wrote:Ivanhoe does not work for me in analysis mode.
What can I do to remedy this? Thanks in advance.
Hi Howard, you didn't specify which OS, 32-bit or 64-bit, interface, or description of "does not work" so it's hard to guess. :)

Re: IvanHoe 999946 Beta

Posted: Fri Jan 20, 2012 4:58 am
by Howard E
I use Vista Home Premium on a 64 bit i920.
Arena 3.0.
However, it now works fine.

Re: IvanHoe 999946 Beta

Posted: Wed Jan 25, 2012 5:04 am
by Marwan
kingliveson wrote:Marwan, hi, please see viewtopic.php?f=3&t=995
Thank you so much Kingliveson. It works good!
What about RobboBaseLib.dll compiling ? how i do this ? step by step please.
Thanks in advance.

Re: IvanHoe 999946 Beta

Posted: Fri Jan 27, 2012 6:03 am
by kingliveson
Marwan wrote:
kingliveson wrote:Marwan, hi, please see viewtopic.php?f=3&t=995
Thank you so much Kingliveson. It works good!
What about RobboBaseLib.dll compiling ? how i do this ? step by step please.
Thanks in advance.

The process is the same for building the Library. However, you must set under project property, configurations property, configuration type, Application (.exe) to Dynamic Library (.dll). See http://msdn.microsoft.com/en-us/library ... 00%29.aspx for more information. In addition, the libraries provided by myself should work with any build of the IvanHoe 999946 series.

Re: IvanHoe 999946 Beta

Posted: Fri Jan 27, 2012 9:20 am
by Marwan
kingliveson wrote:
Marwan wrote:
kingliveson wrote:Marwan, hi, please see viewtopic.php?f=3&t=995
Thank you so much Kingliveson. It works good!
What about RobboBaseLib.dll compiling ? how i do this ? step by step please.
Thanks in advance.

The process is the same for building the Library. However, you must set under project property, configurations property, configuration type, Application (.exe) to Dynamic Library (.dll). See http://msdn.microsoft.com/en-us/library ... 00%29.aspx for more information. In addition, the libraries provided by myself should work with any build of the IvanHoe 999946 series.
my ivanhoe 46 build doesn't work with your dll file, why ?
Are there any special M.V.S 2010 settings?

Should I do this or this is wrong?

# Header Files
arrays.h
arrays_own.h
bits.h
black.h
common.h
control.h
evaluation.v
functions.h
history.i
IH-board.h
IH-hash.h
IH-move.h
IH-SMP.h
IH-win-linux.h
IH-ZOG-MP.h
init_gen.i
make_unmake.h
material_value.i
MonteCarlo.h
null_move.i
pawn_eval.v
Robbo_gen_mossa.h
RobboBaseLibUsage.h
RobboLito.h
RobboTotalBase.h
RobboTripleBase.h
SLAB_MEMORY.h
undef.h
white.h
win32bits.h
win64bits.h
YakovChart.bi
YakovChart.ne

# Source Files
main.c \
arrays.c \
SLAB_MEMORY.c \
set_position.c \
utility.c \
material_value.c \
pawn_eval.c \
evaluation.c \
mobility.c \
50move.c \
MEM_HANDLER.c \
Zobrist_init.c \
Zobrist_use.c \
SEE.c \
move_gen.c \
make_move.c \
un_make_move.c \
top_node.c \
root_node.c \
pv_node.c \
cut_node.c \
all_node.c \
exclude_node.c \
control.c \
MonteCarlo.c \
TopNodeMonteCarlo.c \
RootNodeMonteCarlo.c \
Robbo_glue_new.c
Robbo_mossa.c
input.c \
search.c \
static.c \
next_move.c \
low_depth.c \
qsearch.c \
qsearch_pv.c \
ok_move.c \
signals.c \
magic_mult.c
SMP.c \
SMP_init.c \
SMP_search.c \
top_analysis.c \
root_analysis.c \
root_multipv.c \
benchmark.c
matval_explain.c \
eval_explain.c \
pawn_eval_explain.c \
validate.c \
perft.c


#define HAS_PREFETCH
#define WINDOWS
#define WINDOWS_X64
#define EPONYM ""
#define VERSION ""
#define WINDOWS_LARGE_PAGES
#define USER_SPLIT
#define CHESS_960
#define MODE_GAME_PLAY
#define HAS_POPCNT
#define CON_ROBBO_BUILD
#define YUSUF_MULTICORE