Post by major on Dec 4, 2014 19:49:04 GMT -8
Hi all,
I'm very new at this and would be willing to bet this is probably a stupid question. I don't normally ask for help on forums but I'm stuck so here goes.
Say that in a game of Tic Tac Toe I have a terminal state with the following contents:
[( true ( cell 3 1 o ) ), ( true ( cell 2 2 o ) ), ( true ( cell 3 3 x ) ), ( true ( cell 1 2 o ) ), ( true ( cell 1 3 x ) ), ( true ( cell 1 1 o ) ), ( true ( cell 3 2 x ) ), ( true ( cell 2 1 x ) ), ( true ( cell 2 3 x ) )]
And the previous state was (difference bolded):
[( true ( cell 3 1 o ) ), ( true ( cell 2 2 b ) ), ( true ( cell 3 3 x ) ), ( true ( cell 1 2 o ) ), ( true ( cell 1 3 x ) ), ( true ( cell 1 1 o ) ), ( true ( cell 3 2 x ) ), ( true ( cell 2 1 x ) ), ( true ( cell 2 3 x ) )]
What I want to do is change values in the prior to terminal state and see if the terminal state can still be achieved. For example if ( false ( cell 3 2 x) ) the move ( mark ( cell 2, 2, o ) ) would still lead to the end of the game. What I am hoping to ultimately achieve is to have my player learn the conditions for a given move to create a terminal state and thereby try to achieve them/defend against them depending on the whether or not it is a winning terminal state.
How should I go about doing this? I know I can access a set of GdlSentences with MachineState.getContents() and from there I can convert them to strings, iterate over them, change the ones I want and create new Gdl objects with GdlFactory.create but that seems like a roundabout way of doing things and I am unsure of how to create a GdlSentence object from a Gdl object anyway.
Is this the kind of thing that makes more sense with propnets? If so I would appreciate any advice on using OptimizingPropNetFactory to achieve this.
Hopefully I phrased that in a way that was comprehensible. Thanks in advance for any help/advice, and apologies again if it is a stupid question.
I'm very new at this and would be willing to bet this is probably a stupid question. I don't normally ask for help on forums but I'm stuck so here goes.
Say that in a game of Tic Tac Toe I have a terminal state with the following contents:
[( true ( cell 3 1 o ) ), ( true ( cell 2 2 o ) ), ( true ( cell 3 3 x ) ), ( true ( cell 1 2 o ) ), ( true ( cell 1 3 x ) ), ( true ( cell 1 1 o ) ), ( true ( cell 3 2 x ) ), ( true ( cell 2 1 x ) ), ( true ( cell 2 3 x ) )]
And the previous state was (difference bolded):
[( true ( cell 3 1 o ) ), ( true ( cell 2 2 b ) ), ( true ( cell 3 3 x ) ), ( true ( cell 1 2 o ) ), ( true ( cell 1 3 x ) ), ( true ( cell 1 1 o ) ), ( true ( cell 3 2 x ) ), ( true ( cell 2 1 x ) ), ( true ( cell 2 3 x ) )]
What I want to do is change values in the prior to terminal state and see if the terminal state can still be achieved. For example if ( false ( cell 3 2 x) ) the move ( mark ( cell 2, 2, o ) ) would still lead to the end of the game. What I am hoping to ultimately achieve is to have my player learn the conditions for a given move to create a terminal state and thereby try to achieve them/defend against them depending on the whether or not it is a winning terminal state.
How should I go about doing this? I know I can access a set of GdlSentences with MachineState.getContents() and from there I can convert them to strings, iterate over them, change the ones I want and create new Gdl objects with GdlFactory.create but that seems like a roundabout way of doing things and I am unsure of how to create a GdlSentence object from a Gdl object anyway.
Is this the kind of thing that makes more sense with propnets? If so I would appreciate any advice on using OptimizingPropNetFactory to achieve this.
Hopefully I phrased that in a way that was comprehensible. Thanks in advance for any help/advice, and apologies again if it is a stupid question.