<html>
 <body>
  <div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
   <table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 solid;">
    <tr>
     <td>
      This is an automatically generated e-mail. To reply, visit:
      <a href="http://git.reviewboard.kde.org/r/111705/">http://git.reviewboard.kde.org/r/111705/</a>
     </td>
    </tr>
   </table>
   <br />





 <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Hi Tom, do you think you could turn this into some kind of auto test? So that we run 100 games and check that medium in general wins to easy, and that hard wins to medium?</pre>
 <br />









<p>- Albert</p>


<br />
<p>On July 25th, 2013, 11:22 p.m. UTC, Tom Vincent Peters wrote:</p>








<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('http://git.reviewboard.kde.org/static/rb/images/review_request_box_top_bg.ab6f3b1072c9.png'); background-position: left top; background-repeat: repeat-x; border: 1px black solid;">
 <tr>
  <td>

<div>Review request for KDE Games and Matt Williams.</div>
<div>By Tom Vincent Peters.</div>


<p style="color: grey;"><i>Updated July 25, 2013, 11:22 p.m.</i></p>






<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
 <table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
 <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">This is meant to test whether the new (hard) AI code has changed the medium AI strength in KSquares as a side effect. 
Hard AI code: https://git.reviewboard.kde.org/r/111662/

This is not supposed to be comitted, it's just for testing purposes.

Use by calling KSquares from command line in demo mode 'ksquares --demo'.

Changes:
- old and new ai code side by side
- changed demo mode to two player mode
- speed up of demo mode
- most debug messages commented out
- overall game score for statistics

Changes not included:
- changed playing position of old and new AI

Result:
- the new code for the hard AI doesn't seem to change the strength of the medium AI.
- AI playing in second position has a strong advantage</pre>
  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
 <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Seems like the second player has a serious advantage:

ksquares(18337) KSquaresDemoWindow::gameOver: Game Over
ksquares(18337) KSquaresGame::playerSquareComplete: Player 1 won
ksquares(18337) KSquaresGame::playerSquareComplete: Player 0 ( oldAI ) won 391 times
ksquares(18337) KSquaresGame::playerSquareComplete: Player 1 ( newAI ) won 1314 times

ksquares(17513) KSquaresDemoWindow::gameOver: Game Over
ksquares(17513) KSquaresGame::playerSquareComplete: Player 1 won
ksquares(17513) KSquaresGame::playerSquareComplete: Player 0 ( newAI ) won 288 times
ksquares(17513) KSquaresGame::playerSquareComplete: Player 1 ( oldAI ) won 1008 times</pre>
  </td>
 </tr>
</table>




<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">

 <li>src/aicontroller.h <span style="color: grey">(beaafa8)</span></li>

 <li>src/aicontroller.cpp <span style="color: grey">(0bff5e6)</span></li>

 <li>src/gameboardscene.cpp <span style="color: grey">(0fa669a)</span></li>

 <li>src/ksquaresdemowindow.cpp <span style="color: grey">(eea7e5a)</span></li>

 <li>src/ksquaresgame.h <span style="color: grey">(ca4fe8b)</span></li>

 <li>src/ksquaresgame.cpp <span style="color: grey">(74a06d3)</span></li>

 <li>src/ksquareswindow.cpp <span style="color: grey">(092c795)</span></li>

</ul>

<p><a href="http://git.reviewboard.kde.org/r/111705/diff/" style="margin-left: 3em;">View Diff</a></p>







  </td>
 </tr>
</table>








  </div>
 </body>
</html>