From 3fd43cd5fcb22bb65bf2a92a25d95d801b11c9e0 Mon Sep 17 00:00:00 2001 From: Scott Gasch Date: Wed, 1 Jun 2016 18:58:58 -0700 Subject: Initial checkin for typhoon chess engine. --- src/suite_diff.pl | 225 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 225 insertions(+) create mode 100755 src/suite_diff.pl (limited to 'src/suite_diff.pl') diff --git a/src/suite_diff.pl b/src/suite_diff.pl new file mode 100755 index 0000000..6749f07 --- /dev/null +++ b/src/suite_diff.pl @@ -0,0 +1,225 @@ +#!/usr/bin/perl + +$verbose = 0; +for $arg (@ARGV) { + $verbose = 1 if ($arg eq "-v"); +} + +$one_correct = $two_correct = 0; +$one_beta = $two_beta = 0.0; +$one_null = $two_null = 0.0; +$one_time = $two_time = 0.0; +$one_nodes = $two_nodes = 0.0; +$one_depth = $two_depth = 0.0; +$one_extends = $two_extends = 0; +$one_hash = $two_hash = 0; +$one_useful = $two_useful = 0; + +open(LOG, $ARGV[0]) || die "Can't open $ARGV[0], $!\n"; +while() +{ + if (/^Problem \"([^\"]+)\" solved in (\d+\.\d+)/) + { + $one_correct++; + $name = $1; + $time = $2; + } + elsif (/^>>>>> Problem \"([^\"]+)\" was not solved\. <<<<) +{ + if ($_ =~ /^Problem \"([^\"]+)\" solved in (\d+\.\d+)/) + { + $name = $1; + $time = $2; + if ($name =~ /[^\.]+\.(\d+)/) + { + $name = $1; + } + $two_correct++ if (defined($one{$name})); + } + elsif ($_ =~ /^>>>>> Problem \"([^\"]+)\" was not solved\. <<<< 0) +{ + printf "$ARGV[1] by %6.2f sec\n", $sigma_diff; +} +else +{ + print "even.\n"; +} + +@x = keys(%one); +$one_count = $#x; +@x = keys(%two); +$two_count = $#x; + +printf "1st mv betas:\t%6.3f\t%6.3f\n", + ($one_beta / $one_count), ($two_beta / $two_count); +printf "nullmv cutoff:\t%6.3f\t%6.3f\n", + ($one_null / $one_count), ($two_null / $two_count); +printf "avg depth:\t%6.3f\t%6.3f\n", + ($one_depth / $one_count), ($two_depth / $two_count); +printf "total hash:\t%6.3f\t%6.3f\n", + ($one_hash / $one_count), ($two_hash / $two_count); +printf "useful hash:\t%6.3f\t%6.3f\n", + ($one_useful / $one_count), ($two_useful / $two_count); +printf "k-avg.extend:\t%6.3f\t%6.3f\n", + ($one_extends / $one_count) / 1024, ($two_extends / $two_count) / 1024; +printf "k-extends:\t%6u\t%6u\n", + ($one_extends / 1024), ($two_extends / 1024); +printf "overall nps:\t%6u\t%6u\n", + ($one_nodes / $one_time), ($two_nodes / $two_time); -- cgit v1.3