The GAF Evaluation Server
The GAF Evaluation Server is a simple network server that can perform GA evaluations. The product can be installed on any number of machines and allows the evaluation of a GA to be distributed across the network. The server can also be used with container orchestration such as Docker Swarm see the article Evaluating using Docker Swarm for details.
In order to use the GAF Evaluation Server the GAF.Network NuGet package has been created, this is a simple to use network wrapper that allows population evaluations to be undertaken over the network.
Full details of how to use this package can be found in the article Evaluating using Docker Swarm.
For the GAF Evaluation Servers to perform an evaluation, the fitness function needs to exist on each server. To accomplish this, the Fitness Function is placed in a separate assembly within a class that implements the IFitness interface. Typically this assembly would be deployed to the servers using standard configuration and deployment tools.
Please see the article Implementing IRemoteFitness for details of how to create an assembly for the fitness function.
Configuring the GAF Evaluation Server
In the Docker based examples shown in the article Evaluating using Docker Swarm, the GAF Evaluation server was pre-configured using the GAF.Evaluation.exe.config file. An example of the file is shown below.
<?xml version="1.0" encoding="utf-8"?> <configuration> <configSections> <section name="server" type="GAF.EvaluationServer.Configuration.ServerSection, GAF.EvaluationServer, Version=184.108.40.206, Culture=neutral" /> </configSections> <server> <fitness assemblyName="Fitness.dll" /> </server> <system.diagnostics> <trace autoflush="true" indentsize="4"> <listeners> <add name="consoleListener" type="System.Diagnostics.ConsoleTraceListener" /> <remove name="Default" /> </listeners> </trace> <switches> <add name="TraceLevelSwitch" value="3" /> </switches> </system.diagnostics> </configuration>
The configuration file includes a single custom section called <server/>. Within this section the example shows the <fitness> setting. In the above example this is pointing to a fitness assembly called Fitness.dll, this can point to any assembly that contains a class that implements the IRemoteFitness interface. This assembly should be in the same folder as the server and would typically be deployed using standard configuration and deployment tools such as Ansible. See #Remote Fitness.
Specifying the Listening Endpoint
When the GAF Evaluation Server is launched, it will automatically listen on the primary IP address of the server machine (port 11000). If this is unsuitable, the endpoint can be set explicitly with the _-endpoint_ option, for example, using Mono on OSX or Linux
# mono GAF.EvaluationServer.exe -endpoint:192.168.90:11000
> GAF.EvaluationServer.exe -endpoint:192.168.90:11000
A Complete Example
A complete example of using the server can be found in the article Evaluating using Docker Swarm.