Ludii Forum
heuristics for triangles on hex grid? - Printable Version

+- Ludii Forum (https://ludii.games/forums)
+-- Forum: Suggestions (https://ludii.games/forums/forumdisplay.php?fid=10)
+--- Forum: Ludii Features / Services (https://ludii.games/forums/forumdisplay.php?fid=11)
+--- Thread: heuristics for triangles on hex grid? (/showthread.php?tid=475)



heuristics for triangles on hex grid? - dale walton - 03-01-2021

I'm just starting to look at heuristics.

For Throngs, the needs might be:
triangles of 3 are "live" and represent successful invasions of areas surrounded by enemies. Empty triangles in one's own areas are also risks therefore.
Placing pieces that can be captured should be avoided (i.e. placements on sites with 3+ more enemy than friendly neighbors should be avoided.)
Placements should be made on 95% of ones moves, and thus solid fill should be avoided - but empties should be surrounded by as many friends as possible. (long-range moves involving placement are a valuable resource.
The center is important in the beginning of the game.

What kinds of heuristics do you have that would meet any of these criteria. I see you have for line patterns, are you developing any for triangles? for adjacency counts?

Alternatively, how could these be defined as AI "features"?


RE: heuristics for triangles on hex grid? - DennisSoemers - 03-01-2021

Hmmm no I can't think of any heuristics we currently have that would effectively check for such patterns.

(centreProximity) could help if you say that the center is important, but that applies throughout the whole game, not only in the beginning. So if it's really only important in the beginning of the game, maybe it doesn't help.

I see that this game incrementally updates the players' scores during the game, it doesn't only compute them at the end. This means that the (score) heuristic might be useful, especially if the scores tend to gradually increase with strong play. If there are huge swings in scores throughout the game, and the score values in the middle of the game are not reliably indicative of which player is in the strongest position, it might not help...

The "features" for our Biased MCTS AIs may indeed be better for providing those kinds of geometric-pattern-based hints, but it can be even more difficult to correctly assign their weights than it is for the heuristics.

If you don't mind waiting for several weeks, I am busy automatically training and evaluating heuristics and features and different AIs for all the games we currently have, and expect results... probably somewhere between now and 1 month. I'm pretty sure Throngs is also included in there (only games that were added to Ludii very recently may be excluded), so maybe the automated training will find something useful there.


RE: heuristics for triangles on hex grid? - dale walton - 03-01-2021

In that case, please update Throngs to the attached version which fixes some bugs, and improves the wording of the rules.

In the heuristics is it possible for your team to implement a formula based on the number of turns played so far that peaks at 1 for a particular selected (turn counter per board area) value and falls gradually to 0 on either side like an asymmetrical bell, to use as a multiplier on the various weights? similar to the functions you use to adjust for board size, but also allowing to focus heuristics by stage of the game.  It could use pieces/board size, empty/board-size or occupied/empty ratios instead of move count.


RE: heuristics for triangles on hex grid? - Eric Piette - 03-01-2021

Ok It will be updated for the next release.

Eric