Wednesday, August 24, 2016

What's wrong with Perkun2?

I wish to explain more precisely what is wrong with Perkun2. Imagine a specification:

values {}
agents
{
  agent a1 {}
  agent a2 {}
  ...
  agent an {}
}
interfaces
{
  interface a1 => a2 {}
  ...
  interface an => a1 {}
}

In other words we have n agents performing the actions interchangeably, according to the pattern a1,a2,...,an,a1,a2,...,an,...

Now the algorithm I propose in Perkun2 consists of two parts:
  • how to optimize the actions (output variable values) in order to maximize the expected value of the payload function
  • how to interpret what has actually happened (how to update the belief)
The first part (optimization) seems to work - that is why I decided to publish Perkun2. I overlooked the second part, however, and left the interpretation of the input variables just as it was in Perkun. But in Perkun2 there are multiple agents. Even though the agent a1 tries to find the optimal action, it is also observing the other agents playing. It is not able to see their decisions directly, but it can observe its input variables as they are changing. For example after the agent's a2 move the input variables of the agent a1 may have changed. The same holds for agent a3,..., up to an. So the first agent is looking for the optimal action only once (on his own move), but is observing the game n times (he is observing what happens after his own move as well as what happens after his opponents moves). Note that a1 can only see HIS input variables, which may be hidden for the agents a2,...,an.

What is a little problematic is the fact that the agent ai (i>1) has the model and payload defined in terms of his own variables. Quite logical. We have to use the interfaces to map these variables into the ones observable by the agent a1.

I am sorry about the trouble again. I will try to fix it. I started with the small improvement passing the current agent name to the print_prompt sub. For example you may type:

<<PERL
$$Perkun2::Optimizer::optimizer{print_prompt} =
    sub
    {
        my ($this, $agent_name) = @_;
        print "SUPER PERKUN2 (", $agent_name, ")> ";
    };
   
PERL


(This enhancement is not published yet!) This way the Perkun2 will ask for input variables before the agents moves:

SUPER PERKUN2 (a1)>
SUPER PERKUN2 (a2)>
...
SUPER PERKUN2 (an)>
SUPER PERKUN2 (a1)>
SUPER PERKUN2 (a2)>
...

But it will find the optimal decision only for the agent a1 (even though it is observing the game for all agents).



No comments:

Post a Comment