Formalized Knowledge Base Go Fish Game Design

Graig Fisher

Game Rules:

$ x, y Player(x), Card(y), TakesTurn(x) Þ Decides(x, y) && Requests(x, y)

$ x, y, z Player(x), Card(y), Player(z), Requests(x, y) && Has(z, y) Þ Gives(z, y) && TakesTurn(NextPlayer(x))

$ x, y, z Player(x), Card(y), Player(z), Requests(x, y) && !Has(z, y) Þ Draws(x) && TakesTurn(NextPlayer(x))

$ x, y, z Player(x), Card(y), Card(z), Has(x, y) && Has(x, z) && ValueOf(x) = ValueOf(y) Þ ShowPair(x, MakePair(y, z))

$ x, Player(x), !$ y Card(y), Has(x, y) Þ Draws(x) * 7

$ x, y, z Player(x), Deck(y), Card(z), Draws(x) && Has(y, z) Þ Gives(y, z)

$ x, y, Player(x), Deck(y), !$ z Card(z), Draws(x) && Has(y, z) Þ Gives(y, NULL)


Knowledge Rules:

$ x, y Player(x), Card(y), Requests(x, y) Þ Has(x, y)

$ x, y, z Player(x), Card(y), Player(z), Requests(x, y) && Gives(z, y) Þ !Has(z, y)

$ x, y, z Player(x), Card(y), Player(z), Requests(x, y) && !Gives(z, y) Þ !Has(z, y)

$ x, y, z Player(x), Card(y), Card(z), ShowPair(x, MakePair(y, z)) Þ !Has(x, y) && !Has(x, y)

$ x, y, z Player(x), Deck(y), Card(z), !Has(y, z) Þ Has(x, z)