solutions (and 92 in general) for this puzzle on 8x8
chessboard and there are a lot of classical algorithms
in literature which implement traditional
combinatorial search to find appropriate solutions.
But these methods have some restrictions, for
instance, some of them are applicable for fixed
number of Queens only, some are too complex for
computations, some are hard to modify, etc. (Eight
queens puzzle, 2012).
We will make the classical problem statement
even more complex by introduction of the following
new requirements:
It is possible to introduce new classes of chess-
men without solution re-programming;
Enable users to add and remove figures on board
in real-time by user interventions;
Change preferences and constraints of any agent,
for example, putting constraints on chessmen move
direction;
Support interactive mode for users which will be
able to re-configure queens positions at any moment
of time;
Set time constraint on solution finding. The
system will provide intermediate solutions in case of
lack of time, with minimum of conflicts on
chessboard;
Provide programmers the opportunity to
influence agents intelligence by modify decision
making logic.
Our approach provides a multi-agent solution for ‘8
Queens’ problem with no main ‘control’ center
which analyzes the whole situation on the board and
makes decisions for each Queen. On the contrary,
autonomous software agent is acting on behalf of
each Queen. Agents work as a state machines (in
fact, co-routines) which get control from the multi-
agent dispatcher on each step.
When all agents make their movements they find
that the solution is partial and incomplete because
solution has many unresolved conflicts. Then agents
start to improve the solution by revealing and
resolving conflicts between each other. Two main
strategies of are proposed:
Random moving: if the agent of queen detects a
conflict (it attacks other Queen or is being attacked
by another chess-man), agent will find available free
positions to go and then select one of them
randomly;
Conflict negotiations: at first, each Queen tries to
recognize conflicts with others; then negotiations
should help to find a coordinated decision on who
must move and where to go. Such kind of
intelligence allows finding more suitable solutions
faster.
As the result solution is being produced as a set of
trial-and-errors and trade-offs between chess-men as
it takes place in all complex problems.
3 MAS SOLUTION
A conceptual model of problem domain should be
described in the form of ontology that contains a set
of concepts and relationships (SemanticWeb, 2012).
The basic entity of our ontology ‘Queens’ is a
‘Chesspiece’ concept, with 6 successors (Figure 1).
‘Chesspiece’ is an abstract class, so the logic of
behavior should be specified in the successors.
Figure 1: Concepts and relationships of ontology.
By placing the chess-men on certain positions in
the system, the user creates a scene that could be
then executed dynamically. So the Queens are being
placed in accordance with the rules specified in
ontology. Each chesspiece has its own way of attack
that is taken into account in logics of agents.
If some chesspiece becomes a subject or an
object of an attack, it should go to another position.
Search for available positions could be executed as
follows: first, agent will try to find position where a
chesspiece will not have a conflict with any other
chesspiece; if it is impossible, chesspiece will go to
position with minimal number of conflicts, or stay
on initial place.
Logic of the agents’ behavior could be specified
by ‘Attacks’ attribute in the ontology, which is used
in agent’s methods implementation of the decision
making strategy and logic of new position search.
For example, Knight is known to attack positions
one line away horizontally from itself and two lines
away vertically. Thus, the behavior of chesspieces
could be described by the set of pairs consisting of
horizontal and vertical distances from the current
position. For Knight it is {(1, 2), (2, 1)}. Similarly,
we can describe logic of other chesspieces.
To implement generic logic of different
chesspieces just one type of agent is being used:
Multi-agentSolutionfor'8Queens'Puzzle
279