A Rough Set Version of the Go Game on Physarum Machines

We make use of a Physarum machine that is a biological computing device implemented in the plasmodium of Physarum polycephalum and/or Badhamia utricularis which are one-cell organisms able to build complex networks for solving diﬀerent computational tasks. The plasmodium behavior can model an ancient Chinese game called Go. In the paper, we describe implementation of the Go game on the Physarum machines. A special version of the game is presented, where payoﬀs are assessed by means of the measure deﬁned on the basis of rough set theory. Theoretical foundations given in the paper are supplemented with description of a specialized software tool developed, among others, for simulation of the described game.


INTRODUCTION
Go is a game, originated in ancient China, in which two people play with a Go board and Go stones (cf.[5]).In general, the two players alternately place black and white .stones, on the vacant intersections of a board with a 19 × 19 grid of lines, to surrounding territory.Whoever has more territory at the end of the game is the winner.Vertically and horizontally adjacent stones of the same color form a group.One of the basic principles of Go is the fact that stones must have at least one liberty to remain on the board.A liberty of a given stone is a vacant intersection adjacent to it.If a stone has at least one liberty, then the next stone of a given player can be placed on it to extend his/her group.
As it was shown in [12], the Go game can be simulated by means of a Physarum machine.A Physarum machine is a programmable amorphous biological computing device experimentally implemented in the plasmodium of Physarum polycephalum, also called true slime mould [1].Physarum polycephalum is a single cell organism belonging to the species of order Physarales.General assumptions for games implemented on Physarum machines were presented in [16] and [17].In our case, we assume that Physarum machines are experimentally implemented in the plasmodium of Physarum polycephalum, as well as in the plasmodium of Badhamia utricularis (cf.[7], [17]).Badhamia utricularis is another species of order Physarales.The plasmodium of Physarum polycephalum or Badhamia utricularis, spread by networks, can be programmable by adding and removing attractants and repellents.Two syllogistic systems implemented as Go games were considered in [12], namely, the Aristotelian syllogistic as well as the performative syllogistic.In the first case, the locations of black and white stones are understood as locations of attractants and repellents, respectively.In the second case, the locations of black stones are understood as locations of attractants occupied by plasmodia of Physarum polycephalum and the locations of white stones are understood as locations of attractants occupied by plasmodia of Badhamia utricularis.The Aristotelian syllogistic version of the Go game is a coalition game.The performative syllogistic version of the Go game is an antagonistic game.
In the paper, we will consider the second case (i.e., an antagonistic game implemented in plasmodia of Physarum polycephalum and Badhamia utricularis).For this case, we propose a new version of the Go game.In the presented approach, payoffs are assessed by means of the measure de-fined on the basis of rough set theory.Rough sets are a tool to deal with rough (ambiguous, imprecise) concepts in the universe of discourse (cf.[10]).In our previous research, we used rough sets to describe behavior of Physarum machines (see [8] and [14]).In this case Physarum machines were modeled by means of transition systems or timed transition systems and rough set models were more abstract models built over transition systems.As it was shown, in rough set descriptions of Physarum machines, both a standard definition of rough sets proposed by Z. Pawlak [10] and the Variable Precision Rough Set Model (VPRSM) can be used.The VPRSM approach is a more relaxed and generalized rough set approach, proposed by W. Ziarko in [18].Basic definitions, notions and notation concerning rough set theory as well as the VPRSM approach are recalled in Section 2. A rough set based approach was also used by us to describe strategy games implemented on Physarum machines [7].The strategies of such games were approximated on the basis of a rough set model, describing behavior of the Physarum machine, created according to the VPRSM approach.
In the paper, another rough set based approach to assessing payoffs of games implemented on Physarum machines is proposed in Section 3.This time, for the Go game, we do not use transition system models describing behavior of Physarum machines, but our attention is focused on the adjacent surroundings of stones.Rough sets are used to determine how (i.e., exactly or roughly) these surroundings approximate sets of intersections occupied by either black or white stones (i.e., occupied by either plasmodia of Physarum polycephalum or plasmodia of Badhamia utricularis).
To support research on programming Physarum machines and simulating Physarum games, we are developing a specialized software tool, called the Physarum software system, shortly PhysarumSoft (see [13]).The approach presented in this paper is also implemented in PhysarumSoft.A short description of the Physarum game module is given in Section 4.

THE RUDIMENTS OF ROUGH SETS
In this section, we recall necessary definitions, notions and notation concerning rough sets.
The idea of rough sets (see [10]) consists of the approximation of a given set by a pair of sets, called the lower and the upper approximation of this set.Some sets cannot be exactly defined.If a given set X is not exactly defined, then we employ two exact sets (the lower and the upper approximation of X) that define X roughly (approximately).
Let U = ∅ be a finite set of objects we are interested in.U is called the universe.Any subset X ⊆ U of the universe is called a concept in U .Let R be any equivalence relation over U .We denote an equivalence class of any u ∈ U by [u]R.With each subset X ⊆ U and any equivalence relation R over U , we associate two subsets: The definitions given earlier are based on the standard definition of set inclusion.Let U be the universe and A, B ⊆ U .The standard set inclusion is defined as In some situations, the application of this definition seems to be too restrictive and rigorous.W. Ziarko proposed in [18] some relaxation of the original rough set approach.His proposition was called the Variable Precision Rough Set Model (VPRSM).The VPRSM approach is based on the notion of the majority set inclusion.Let U be the universe, A, B ⊆ U , and 0 ≤ β < 0.5.The majority set inclusion is defined as where card denotes the cardinality of the set.A β ⊆ B means that the specified majority of elements belonging to A belongs also to B. One can see that if β = 0, then the majority set inclusion becomes the standard set inclusion.
By replacing the standard set inclusion with the majority set inclusion in definitions of approximations, we obtain the following two subsets: called the R β -lower and R β -upper approximation of X, respectively.

ROUGH SET BASED ASSESSMENT OF PAYOFFS
In this section, we present basic principles of the rough set version of the Go game implemented on the Physarum machine.Let a board for the Go game, with a 19 × 19 grid of lines, be in use.The set of all intersections of the grid is denoted by I.At the beginning, the fixed numbers of original points of both the plasmodia of Physarum polycephalum and the plasmodia of Badhamia utricularis are randomly deployed on intersections.An example of the initial configuration of the Go game is shown in Figure 1.In this case, three original points of the plasmodia of Physarum polycephalum, P h1, P h2, and P h3, understood as black stones, as well as three original points of the plasmodia of Badhamia utricularis, Ba1, Ba2, and Ba3, understood as white stones, are deployed on intersections.
During the game, the two players alternately place attractants on the vacant intersections of the board.The first player plays for the Physarum polycephalum plasmodia, the second one for the Badhamia utricularis plasmodia.The plasmodia look for attractants, propagate protoplasmic veins towards them, feed on them and go on.In a real-life implementation of Physarum machines, attractants are sources of nutrients or pheromones, on which the plasmodium feeds (see [1]).The attractants occupied by plasmodia of Physarum polycephalum are treated as black stones whereas the attractants occupied by plasmodia of Badhamia utricularis, as white stones.
Remark 1.We assume that the state of the Go game (i.e., the state of the Physarum machine) is observed only • P = {P h1, P h2, . . ., P h k } is a set of original points of the plasmodia of Physarum polycephalum.
• A = {A t }t=0,1,2,... is the family of the sets of attractants, where A t = {A t 1 , A t 2 , . . ., A t r t } is the set of all attractants present at time instant t in PM.
One can see that the structure of the Physarum machine PM is changing in time (new attractants are added by the players).Positions of original points of the plasmodia as well as attractants are considered in the two-dimensional space of intersections.Hence, each intersection i ∈ I is identified by two coordinates x and y.This fact will be denoted by i(x, y).For each intersection i(x, y), we can distinguish its adjacent surroundings: It is worth noting that liberties of stones placed at intersections are defined only in adjacent surroundings of stones.
After each move (i.e., placement of a new attractant on the board by one of the players), the following rules of behavior of the plasmodia are applied: 1.As soon as the attractant is placed on an intersection and the adjacent surroundings contain the plasmodium of either Physarum polycephalum or Badhamia utricularis, this new attractant is occupied by the plasmodium.
2. If there exist more than one intersection occupied by both the plasmodia of Physarum polycephalum and the plasmodia of Badhamia utricularis in the adjacent surroundings of the intersection where the attractant was placed, then only the plasmodia of one type (randomly selected) are attracted.The plasmodium of Physarum polycephalum and the plasmodium of Badhamia utricularis cannot occupy the same attractants.
In case of Rule 2, the fusion of the plasmodia of one type can hold.Moreover, Rule 2 causes that, in some situations, given moves are taken under the players' own risk.Let us consider an illustrative configuration of the Go game shown in Figure 2.There are two attractants occupied by the plasmodia of Physarum polycephalum (black stones) and one attractant occupied by the plasmodia of Badhamia utricularis (white stone) in the adjacent surroundings of the intersection marked with ×.If the first player places a new attractant A× at intersection ×, two situations, mutually exclusive, will be possible.In the first situation, two plasmodia of Physarum polycephalum will be attracted by A× and fused on it.In this case, a new black stone will appear.
In the second situation, the plasmodium of Badhamia utricularis will be attracted by A×.In this case, a new white stone will appear.It means that the first player's move may work to the advantage of the opponent.• I ∅ t -a set of all vacant intersections at t.
• I • t -a set of all intersections occupied by plasmodia of Physarum polycephalum at t (black stones).
• I • t -a set of all intersections occupied by plasmodia of Badhamia utricularis) at t (white stones).
One can see that A set I π t of all intersections occupied by given plasmodia π (either the plasmodia of Physarum polycephalum or the plasmodia of Badhamia utricularis) at given time instant t can be approximated (according to rough set definition) by surroundings of intersections occupied by these plasmodia.Such approximation will be called surroundings approximation.
The lower surroundings approximation Surr * (I π t ) of I π t is given by configuration of the Go game.
where π is either • or •.The lower surroundings approximation consists of all intersections, occupied by plasmodia π, whose all of not vacant adjacent intersections are also occupied by π.Each intersection i ∈ I such that i ∈ Surr * (I π t ) is called a full generator of the payoff of the player playing for the plasmodia π.
The upper surroundings approximation Surr * (I π t ) of I π t is given by where π is either • or •.The upper surroundings approximation consists of all intersections, occupied by plasmodia π, whose adjacent surroundings cover at least one intersection also occupied by π.
The set BNSurr(I π t ) = Surr * (I π t ) − Surr * (I π t ) is referred to as the boundary region of surroundings approximation of I π t at time instant t.Each intersection i ∈ I such that i ∈ BNSurr(I π t ) is called a partial generator of the payoff of the player playing for the plasmodia π.
By replacing the standard set inclusion with the majority set inclusion in the definition of the lower surroundings approximation (according to the VPRSM approach recalled in Section 2), we obtain the β-lower surroundings approximation: Each intersection i ∈ I such that i ∈ Surr β * (I π t ) is called a full quasi-generator of the payoff of the player playing for the plasmodia π.
On the basis of lower surroundings approximations, we define a measure assessing payoffs of the players.For the first player playing for the Physarum polycephalum plasmodia, the payoff measure has the form: For the second player playing for the Badhamia utricularis plasmodia, the payoff measure has the form: In a more relaxed case, we have respectively: and ).One can see that the VPRSM approach enables us to set different levels of difficulty of the Go game.
The goal of each player is to maximize its payoff.Let us consider an illustrative configuration of the Go game after several moves shown in Figure 3.
In case of a standard definition of rough sets (i.e., the most rigorous case), intersections belonging to lower surroundings approximations Surr * (I • t ) and Surr * (I • t ) of (I • t ) and (I • t ), respectively, are marked with grey rectangles in Figure 4.It is worth noting that all of the intersections from Surr * (I • t ) and Surr * (I • t ) are full generators of the payoffs of the players playing for the Physarum polycephalum plasmodia and Badhamia utricularis plasmodia, respectively.Hence, we obtain Θ • = 1 and Θ • = 2.The second player, playing for the Badhamia utricularis plasmodia, wins.The agent is rational if (s)he follows one of the rational strategies to win or not to lose in moves.Also, we can define strategies in the Go game if we deal with the VPRSM surroundings approximation.A mapping from the intersections belonging to γ-lower surroundings approximations Surr γ * (I π t ) at t to the intersections belonging to β-lower surroundings approximations Surr β * (I π t+k ) at t+k is said to be a set of rational β-strategies of π of radius k to win if γ < beta.A mapping from the intersections belonging to γ-lower surroundings approximations Surr The agent is β-rational if (s)he follows one of the rational β-strategies to win or not to lose in moves.

A SOFTWARE TOOL
In [13], we described selected functionality of the current version of a new software tool, called PhysarumSoft, developed by us for programming Physarum machines and simulating Physarum games.In this section, we recall important features of this tool, as well as present additional information about the part of the tool responsible for simulating a rough set version of the Go game.
PhysarumSoft was designed for the Java platform.A general structure of this tool is shown in Figure 6.We can • Physarum language compiler.
• Module of programming Physarum machines.
• Module of simulating Physarum games.
The main features of PhysarumSoft are the following: • Portability.Thanks to the Java technology, the created tool can be run on various software and hardware platforms.In the future, the tool will be adapted for platforms available in mobile devices and as a service in the cloud.
• Modularity.The project of PhysarumSoft and its implementation covers modularity.It makes the tool extend easily in the future.
To simulate games on Physarum machines, we are developing a special module of PhysarumSoft called the Physarum game simulator.This module works under the client-server paradigm.A general structure of the Physarum game simulator is shown in Figure 7.In PhysarumSoft, communication between clients and the server is realized through text messages containing statements of the Physarum language.The Physarum language, is a new object-oriented programming language, utilizing the prototype-based approach (cf.[3]), designed by us to program Physarum machines, i.e., to set the spatial distribution (configuration) of stimuli (attractants, repellents) controlling propagation of protoplasmic veins of the plasmodium.For a detailed description of the Physarum language, we refer the reader to [6], [9], and [15].
The server sends to clients information about the current configuration of the Physarum machine (localization of the original points of Physarum polycephalum and Badhamia utricularis, localization of stimuli, as well as a list of edges, corresponding to veins of plasmodia, between active points) through the XML file.Each original point of the plasmodia of Physarum polycephalum or the plasmodia of Badhamia utricularis and each attractant occupied by these plasmodia is called an active point in the Physarum machines.
The server-side application of the Physarum game simulator is called PGServer.The main window of PGServer is shown in Figure 8.In this window, the user can: • select the port number on which the server listens for connections, start and stop the server, • set the game: a Physarum game with strategy based on stimulus placement (see [7]), a Physarum game with strategy based on stimulus activation (see [7]), a rough set version of the Go game (see Section 3), • shadow information about actions undertaken.
The client-side application of the Physarum game simulator is called PGClient.The main window of PGClient is shown in Figure 9.In case of the Go game, the user can: • set the server IP address and its port number, • start the participation in the game, • put attractants at the vacant intersections of a board, • monitor the current state of the game as well as the current assessment of payoffs.

CONCLUSIONS
A new version of the Go game, based on rough set theory and implemented on the Physarum machines, has been presented.The presented version is an antagonistic game.The locations of black stones are understood as intersections occupied by plasmodia of Physarum polycephalum and the locations of white stones are understood as intersections occupied by plasmodia of Badhamia utricularis.The main aim of our further research is to propose a coalition game based on a rough set assessment of payoffs.Moreover, we will extend the spectrum of measures by applying various rough set approaches.

Figure 1 :
Figure 1: An example of the initial configuration of the Go game implemented on the Physarum machine

Figure 2 :
Figure 2: An illustrative configuration of the Go game, where a move is taken under the player's own risk Formally, during the game, at given time instant t, we can distinguish three kinds of intersections in the set It of all intersections:

Figure 3 :
Figure 3: An illustrative configuration of the Go game after several moves

Figure 4 :
Figure 4: A configuration of the Go game after several moves (payoffs defined on the basis of a standard definition of rough sets) In case of the VPRSM approach (i.e., a more relaxed case), for β = 0.25, intersections belonging to lower surroundings approximations Surr 0.25 * (I • t ) and Surr 0.25 * (I • t ) of (I • t ) and (I • t ), respectively, are marked with grey rectangles in Figure 5.It is worth noting that some of intersections

Figure 5 :
Figure 5: A configuration of the Go game after several moves (payoffs defined on the basis of the VPRSM approach for β = 0.25) Let us consider now how we can define strategies in our Go game if we deal with the standard surroundings approximation.A mapping from the intersections belonging to upper surroundings approximations Surr * (I π t ) at t to the intersections belonging to lower surroundings approximations Surr * (I π t+k ) at t + k is said to be a set of rational strategies of π of radius k to win.A mapping from the intersections belonging to β-lower surroundings approximations Surr β * (I • t ) at t to the intersections belonging to the union Surr γ * (I • t+k ) ∪ Surr β * (I • t+k ) at t + k, where 0 < β ≤ γ and card(Surr β * (I • t )) ≤ card(Surr γ * (I • t+k ) ∪ Surr β * (I • t+k )) < card(Surr * (I • t+k )), is said to be a set of rational strategies of • (the player playing for Badhamia utricularis) of radius k not to lose.A mapping from the intersections belonging to β-lower surroundings approximations Surr β * (I • t ) at t to the intersections belonging to the union Surr γ * (I • t+k ) ∪ Surr β * (I • t+k ) at t+k, where 0 < β ≤ γ and card(Surr β * (I • t )) ≤ card(Surr γ * (I • t+k ) ∪ Surr β * (I • t+k )) < card(Surr * (I • t+k )), is said to be a set of rational strategies of • (the player playing for Physarum polycephalum) of radius k not to lose.The agent is rational if (s)he follows one of the rational strategies to win or not to lose in moves.Also, we can define strategies in the Go game if we deal with the VPRSM surroundings approximation.A mapping from the intersections belonging to γ-lower surroundings approximations Surr γ * (I π t ) at t to the intersections belonging to β-lower surroundings approximations Surr β * (I π t+k ) at t+k is said to be a set of rational β-strategies of π of radius k to win if γ < beta.A mapping from the intersections belonging to γ-lower surroundings approximations Surr γ * (I • t ) at t to the intersections belonging to the union Surr δ * (I • t+k )∪Surr γ * (I • t+k ) at t+ k, where 0 < β ≤ γ and 0 < β ≤ δ and card(Surr γ * (I • t )) ≤ card(Surr δ * (I • t+k ) ∪ Surr γ * (I • t+k )) < card(Surr β * (I • t+k )), is said to be a set of rational β-strategies of • (the player play- γ * (I • t ) at t to the intersections belonging to the union Surr δ * (I • t+k )∪Surr γ * (I • t+k ) at t+ k, where 0 < β ≤ γ and 0 < β ≤ δ and card(Surr γ *(I • t )) ≤ card(Surr δ * (I • t+k ) ∪ Surr γ * (I • t+k )) < card(Surr β * (I • t+k )), is said to be a set of rational β-strategies of • (the player play-ing for Badhamia utricularis) of radius k not to lose.A mapping from the intersections belonging to γ-lower surroundings approximations Surr γ * (I • t ) at t to the intersections belonging to the union Surr δ * (I • t+k ) ∪ Surr γ * (I • t+k ) at t + k, where 0 < β ≤ γ and 0 < β ≤ δ and card(Surr γ * (I• t )) ≤ card(Surr δ * (I • t+k ) ∪ Surr γ * (I • t+k )) < card(Surr β * (I • t+k )), is said to be a set of rational β-strategies of • (the player playing for Physarum polycephalum) of radius k not to lose.

Figure 6 :
Figure 6: A general structure of PhysarumSoft distinguish three main parts of PhysarumSoft:

Figure 7 :
Figure 7: A general structure of the Physarum game simulator

Figure 8 :
Figure 8: The main window of PGServer

Figure 9 :
Figure 9: The main window of PGClient