summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWolfgang Rohdewald <wolfgang@rohdewald.de>2016-08-13 06:06:03 (GMT)
committerWolfgang Rohdewald <wolfgang@rohdewald.de>2016-08-25 06:43:11 (GMT)
commit5eda0a6464e00774d31c502ecfa865b5a07a3c7a (patch)
treeb9240430932f497b9b62de35f675b3c207dd8b0b
parentf18b43cce5dd1be908046065a7936517bbe33634 (diff)
debug AI: fixed float output format: Is now the same for Py3 and Py2
-rw-r--r--src/intelligence.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/intelligence.py b/src/intelligence.py
index 996a660..2cc08ce 100644
--- a/src/intelligence.py
+++ b/src/intelligence.py
@@ -221,7 +221,7 @@ class AIDefault(object):
candidate.keep -= keep
if Debug.robotAI:
aiInstance.player.game.debug(
- 'weighCallingHand %s winnerTile %s: discardCandidate %s keep -= %s' % (
+ 'weighCallingHand %s winnerTile %s: discardCandidate %s keep -= %.4f' % (
newHand, winnerTile, candidate, keep))
# more weight if we have several chances to win
candidate.keep -= float(len(winningTiles)) / len(
@@ -367,7 +367,7 @@ class TileAI(object):
def __str__(self):
dang = ' dang:%d' % self.dangerous if self.dangerous else ''
- return '%s:=%s%s' % (self.tile, self.keep, dang)
+ return '%s:=%.4f%s' % (self.tile, self.keep, dang)
def __repr__(self):
return 'TileAI(%s)' % str(self)