aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLauro Ramos Venancio <lauro.venancio@gmail.com>2007-08-08 18:32:57 +0000
committerLauro Ramos Venancio <lauro.venancio@gmail.com>2007-08-08 18:32:57 +0000
commitc5ec15c5ee66da2cd282cb1a4914a13d6a95ccbe (patch)
treeaa7451f41406c0cd79904bdc4baa4698f782d608
parentab6d98e02505f78789c6835a36f600f71f019203 (diff)
- Define SMALL_PROBLEM_SIZE
- Ignore the maxtime to make the test deterministic. git-svn-id: https://llvm.org/svn/llvm-project/test-suite/trunk@40934 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--MultiSource/Applications/hexxagon/hexxagon.cpp7
-rw-r--r--MultiSource/Applications/hexxagon/hexxagonmove.cpp4
2 files changed, 7 insertions, 4 deletions
diff --git a/MultiSource/Applications/hexxagon/hexxagon.cpp b/MultiSource/Applications/hexxagon/hexxagon.cpp
index 0cc071c1..2c197692 100644
--- a/MultiSource/Applications/hexxagon/hexxagon.cpp
+++ b/MultiSource/Applications/hexxagon/hexxagon.cpp
@@ -151,8 +151,11 @@ int main(int argc, char *argv[])
int quit = 0;
int mode = 1;
-
- int level = 4;
+#ifdef SMALL_PROBLEM_SIZE
+ int level = 3;
+#else
+ int level = 4;
+#endif
int time = 12;
int llvm_index;
diff --git a/MultiSource/Applications/hexxagon/hexxagonmove.cpp b/MultiSource/Applications/hexxagon/hexxagonmove.cpp
index e4887d2d..45a8fb45 100644
--- a/MultiSource/Applications/hexxagon/hexxagonmove.cpp
+++ b/MultiSource/Applications/hexxagon/hexxagonmove.cpp
@@ -158,13 +158,13 @@ void HexxagonMoveList::scoreAllMoves(HexxagonBoard board, int depth, void (*call
{
int t = getTime();
- for(int i = 1; (i < depth) && (getTime() - t <= maxtime); i++)
+ for(int i = 1; (i < depth)/* && (getTime() - t <= maxtime) */; i++)
{
int best = -SCR_INFINITY;
int alpha = -SCR_INFINITY;
int beta = SCR_INFINITY;
- for(int j = 0; (j < getNrMoves()) && (getTime() - t <= maxtime) && (best < beta); j++)
+ for(int j = 0; (j < getNrMoves()) && /* (getTime() - t <= maxtime) && */ (best < beta); j++)
{
if(best > alpha)
alpha = best;