Menu

Tick5 LUA script query

Help
2007-11-03
2013-04-08
  • Nobody/Anonymous

    Hey XMartin :D...
    I have a query regarding the LUA script...
    First of all, great work :)...
    Well, back to the query...In the hotspots class, why do you set the bounds to (Board::Dimension - 1)
    So if the board is 15x15, the hotspot bound will be 14 ? Why is that ?

    thanks alot in advance

    regards
    Jayant

     
    • Nobody/Anonymous

      Thanks Jayant,

      The board is 15x15, but the coordinates are from (0,0). So the upper bound of x- and y-coordinate is 14. You may take a look at the picture in the AI Programming Interface section of the manual (http://tick5.sourceforge.net/manual/manual_api.html).

      The variable bound in the Lua script is actually the upper bound, while the lower bound is implicitly set to zero. This may affect the readability. It would be more clear, if I explicitly declare a variable for upper bound and another for lower bound.

      Please feel free to let me know, if you have further questions. And please do let me know if your AI can beat mine. :-)

      regards,
      xmartin

       
    • Nobody/Anonymous

      Me again XMartin :)...
      Am trying to add a deeper threat search ...
      But I was going through the LUA script, and in it, I have a few queries :)...

      Hotspots : When we log hotspots, we log for both the colors, right? But as the for-loop suggests, we even add the spot in concern (i.e., offset.x = offset.y = 0, as in, the square on which the last move was made). Isn't this in a way incorrect? Also, after choosing the best move from the sorted list of hotspots, don't we need to remove this spot from the hotspot list ?

      am sure, in a weeks time, I'll be able to come up with threat search and maybe alpha beta combined AI...

      regards
      Jayant

       
    • Nobody/Anonymous

      Hello Jayant,

      Current implementation of the Hotspots class stores a list of x- and y-coordinate, no matter whether the spots are occupied or empty. So we need to call putstone() to check whether the spot is empty or not. Of course, you may try another implementation that stores empty spots only.

      Answers to your questions:

      Right, moves of both colors are logged.

      Right, the x- and y-coordinate of the move itself is stored, which is offset.x = offset.y = 0, when a move is logged.

      No, we don't need to remove it from the hotspots list after the best move is chosen. 

      Looking forward to hearing your progress. :-) I'll appreciate if you are willing to release your AI, open or closed source. :-)

      regards,
      xmartin

       

Log in to post a comment.