SanchoGGP / ggp-base

The General Game Playing Base Package
8 stars 4 forks source link

Deliberately complex GDL crashes Sancho #390

Open arr28 opened 8 years ago

arr28 commented 8 years ago

I think the claim is that they're not actually invalid GDL. I'll need to see. I think the following games from http://gamemaster.stanford.edu/gamemaster/games/ are relevant.

arr28 commented 8 years ago

bandl(N) are a series of puzzles where you simultaneously play buttons & lights on N boards. Boards 1 & 2 are important - the others are ignored. Actions are of the form...

set {a,b,c} {a,b,c} {a,b,c}...

So, for N=3, it has a branching factor of 81. For N=7, the branching factor is 3^7 = 2,187 which is above our maximum branching factor (MCTSTree.MAX_SUPPORTED_BRANCHING_FACTOR = 1000). Bumping that up a bit would still leave us with difficulties in the N=10 (59,049) and N=30 (2*10^14) variants that exist in the stanford gamemaster repository.

So, there's no way the bandl(N) games are fixable before the competition. It would involve a completely different grounder with analysis & factoring logic applied pre-grounding.

arr28 commented 8 years ago

arithmetic has actually invalid GDL, so isn't of concern. We already spot and log it.

22:02:04.789 ! Invalid GDL.  No goals defined for our role (player)!  We will crash.
arr28 commented 8 years ago

hexbad comes in two forms - manager.kif & player.kif.

The former is Hex as we know and love it with the cunning connected and owner base propositions. These make it tractable (trivial in fact) to calculate whether there's a path from one edge of the board to the other.

The latter is the version that the stanford gamemaster gives to the player. This is Hex as you'd naively code it. No "superfluous" base propositions and paths calculated with rules.

  (<= (path ?role ?x ?y ?x ?y) (true (cell ?x ?y ?role)))
  (<= (path ?role ?x1 ?y1 ?x3 ?y3)
      (true (cell ?x1 ?y1 ?role))
      (row ?x3) (col ?y3)
      (adjacent ?x1 ?y1 ?x2 ?y2)
      (path ?role ?x2 ?y2 ?x3 ?y3))

This means that, during propnet construction, we're forced to calculate every possible valid path across the board for both players. Which is clearly a non-starter.

I can't even begin to imagine how analysis might convert the "player" rules into "manager" rules (or similar) automatically. This is basically a propnet killer. (I wouldn't be at all surprised if prover-based players could cope with this.)