bug-gnubg
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-gnubg] eval.c cleanup [Was:Generate bear off db(s) for Win32]


From: Øystein Johansen
Subject: [Bug-gnubg] eval.c cleanup [Was:Generate bear off db(s) for Win32]
Date: Mon, 2 Dec 2002 13:45:50 +0100

>> Why doesn't it help if eval.o and matchequity.o is recompiled without
>> HAVE_XML2 defined?
>
>It would! But it's impossible with the current structure: We would need
>two different config.h: one for compiling gnubg and one for compiling
>makebearoff. This is very ugly!

Yes, I agree it's ugly, but just modifying the config.h file just for
generating the makebearoff.exe (and then back to original) isn't that much
trouble.

>It's way better to clean up the code: move the XML part of matchequity
>to a new file parsemet.c (or whatever).

Sure, I think that sounds like a OK name.

[snip]
>>
>> Yes, a cleanup here would be nice. I can take a look at this in the weekend
I
>> guess. (If no one else voluenteers for the task.)
>
>I'll clean-up matchequity.c.

What should I leave in eval.c ?

Keepers:
EvalInitialise
EvalShutdown
EvaluatePosition
EvaluatePerfectCubeful
InvertEvaluationR
InvertEvaluation
InvertEvaluationCf
FindBestMove
FindnSaveBestMoves
SwapSides
GameStatus
EvalCacheResize
EvalCacheStats
GenerateMoves
ApplyMove
ClassifyPosition
Utility
SetCubeInfoMoney
SetCubeInfoMatch
SetCubeInfo
swap
SanityCheck
EvalBearoff1
EvaluatePositionCubeful
FindCubeDecision
GeneralCubeDecisionE
GeneralEvaluationE
GeneralEvaluationEPlied
EvaluatePositionCubeful3
GeneralEvaluationEPliedCubeful
FindBestCubeDecision

I think all the above functions should be kept in eval.c. Any comments?

BTW: What's the difference of FindBestCubeDecision and FindCubeDecision?


FindPubevalMove (move this to pub_eval.c)

TrainPosition (move all training functions to train.c?)
EvalStatus
EvalNewWeights
EvalSave

Can this be decleared static?
/* internal use only */
extern unsigned long EvalBearoff1Full( int anBoard[ 2 ][ 25 ],
                                       float arOutput[] );

getCurrentGammonRates ?
getMoneyPoints ?
getMatchPoints ?
getCubeDecisionOrdering ?
RefreshMoveList ?
ScoreMove ?

Does the above function belong in eval.c? (There are other functions as well
that I have not listed in this post.) Where should I put functions like these?

-Øystein






reply via email to

[Prev in Thread] Current Thread [Next in Thread]