## Agent equilibrium

Let''s say we have 2 agents running in a world, each with a set of possible actions ( common for each agent ). Each agent can pick one of the actions ( strategies ) at a time in one round. Depending on his action and the action of the other agent, a reward is given, different for each agent. We can summarize this in the following table:

 Reward Action 1 Action 2 Action 1 3, 3 5, 0 Action 2 0, 5 5, 5

For example if Agent 1 and Agent 2 both pick Action 1 then their rewards are respectively 3 and 3.

From this matrix we can see the following : If both agents use Action 2 then they have maximum reward. If the agents choose Action 1, then they have a good reward but not the best. If they choose differently, one of them maximizes its reward but the other has a zero one.

In this situation we call the pair 5,5 the Nash equilibrium pair because if any of the agents change their strategy independently they cannot get a better reward.

The situation 3,3 is Pareto Efficient because any change of strategy could make an agent go better but could make another agent worse.

The social welfare is the sum of the rewards for a given situation. For example the social welfare for Action 2, Action 2 is 10, which is the biggest value for total received reward.

## Agent types

What is an agent? A primary definition would say that an agent is an autonomous software program that can take decisions based on the given inputs.

This means that an agent has a somewhat "intelligence". This intelligence is disputed, however. In nature, a system also takes actions according to given stimuli. According to the 3rd classical mechanic law, if one applies a force to a system, the system responds with an equal force back. This is a specific law of a more general idea: any system that is disturbed from its current balance responds in order to get the balance back.

In the same idea, a reactive agent is an agent that waits for environment changes. The agent gets the input and then, using a rule based system or any other possible implementation, picks an action that it must take.

A proactive agent is an agent that takes an action independent on environment changes, e.g. it takes initiative in the system.

## Possible worlds of belief

What are possible worlds of belief?

Let's say that we have a fact X. We may know that X is true. But we might also now that X will be true at a time t in the future. Also X may be true at a time in the future. X is believed to be true.

All this statements can be implemented in logic using possible worlds approach. In a certain world John lives in America. In another world John lives in Africa. Facts can have different truth values, but all worlds may connect to each other.

If fact X is true in all worlds, then we can conclude that X is true.

Such a statement is called a tautology.

In Kripke semantics for possible worlds belief, every world has possible accessible worlds. For example if John lives in America in world 1, then if he believes that is possible that he lives in Africa, then world 2 is accessible from his world, world 1. We can write this as world 1 -> world 2.

Further we can discuss links between more worlds and problems of accessing a world starting from a not directly accessible world. In such cases, there are chains of beliefs that can be modeled.

Properties of the accessibility relation:

1. Reflexivity: w -> w . This means any world is accessible from itself.

2. Transitivity: If there is w1->w2->w3 then we can assume we have w1->w3.

One interesting consequence of the properties, if the model accepts them, is introspection. If John believes X, then John believes that "John believes X" . This is part of Doxastic logic.

## K-nearest neighbor classification algorithm

K-nearest neighbour is a classic, simple and well known classification algorithm. It''s a supervised learning algorithm.

Let's suppose we have a Q count set of points in our n-dimensional space where all items are placed. In this space, distance between points (elements) that we need to cluster is measured using different distance metrics.

If we have a new element E which we need to classify, the algorithm uses the following idea: count the K nearest neighbors and assign the new point to the majority.

In case of equality, we can either: give up furthest away element so equality is broken or choose with a evaluation function which class the new point will belong to ( preferential class for example ), or another solution implementation dependent.

The algorithm is very simple, and it has good results in practice. However it is sensible to outliers, and very far away points from the training set are not classified very well.

Of course K can variate according to data size, computation power, time needed for classification or more criteria.

Get more Joomla!® Templates and Joomla!® Forms From Crosstec