1 Introduction
2 Evolutionary Multi-agent Systems and Parallel Skeletons
2.1 Parallel Programming in Erlang
2.2 Algorithmic Skeletons
2.3 The Skel Library for Erlang
-
func
is a simple wrapper skeleton that encapsulates a sequential function as a streaming skeleton. -
pipe
models a composition of skeletons \(s_1, s_2, \dots , s_n\) over a stream of inputs. Within the pipeline, each of the \(s_i\) is applied in parallel to the result of the \(s_{i-1}\). -
farm
models the application of the same operation over a stream of inputs. Each of the n farm workers is a skeleton that operates in parallel over independent values of the input stream. -
cluster
is a data parallel skeleton, where each independent input, \(x_i\) can be partitioned into a number of sub parts, \(x_1, x_2, \dots , x_n\), that can be worked upon in parallel. A skeleton, s, is then applied to each element of the sub-stream in parallel. -
feedback
wraps a skeleton s, feeding the results of applying s back as new inputs to s, provided they match a filter function, f.
3 A New Skeleton for Evolutionary Multi-agent Systems
Env
are specific for each instance of the skeleton.
Prob
are specific to each problem that is solved using the skeleton. Therefore, the EMAS skeleton accepts two types of input:-
a set of parameters for the computation, including the number of agents, initial energy and details about reproduction (e.g. the maximum energy given by a parent to a child), mutation (e.g. the chance of mutation during reproduction) and recombination (e.g. the probability of recombining parent solutions during reproduction);
-
problem-specific
solution
,evaluation
,mutation
andrecombination
functions.
fight
, reproduce
and die
functions are done sequentially, and a separate dedicated Erlang process handles migration of agents. This version represents coarse-grained implementation of the EMAS computation, with a small number of potentially expensive Erlang processes than in the previous two versions;3.1 Use of the EMAS Skeleton
start()
) is provided by the skeleton. Figure 3 shows an example of an input file with these functions, with some auxiliary functions missing. This example (Traffic optimisation) was used in the Sect. 4 to evaluate the EMAS skeleton.
4 Evaluation
pi
|
titanic
|
zeus
|
power
|
phi
| |
---|---|---|---|---|---|
Arch | Arm | AMD | AMD | IBM | Intel |
Proc | Cortex-A7 | Opteron 6176 | Opteron 6276 | Power8 | Xeon Phi 7120 |
Cores | 4 | 24 | 64 | 20 | 61 |
Threads | 4 | 24 | 64 | 160 | 244 |
Freq. | 900 MHz | 2.3 GHz | 2.3 GHz | 3.69 GHz | 1.2 GHz |
L2 Cache | 256 KB | 24 \(\times \) 512 KB | 32 \(\times \) 2 MB | 20 \(\times \) 512 KB | 61 \(\times \) 512KB |
L3 Cache | – | 4 \(\times \) 6 MB | 4 \(\times \) 8 MB | 20 \(\times \) 8 MB | – |
RAM (GB) | 1 | 32 | 256 | 256 | 16 |