Skip to content

Developer guide

BorjaFG edited this page Feb 26, 2019 · 18 revisions

Main apps

These are the main apps in this project:

  • Badger: C# GUI app that allows the user to design, run and analyze experiments.
  • Herd Agent: C# service/daemon process that is installed in the slave machines to receive job requests, run them and return the results.
  • RLSimion: C++ executable that does the actual simulation and Reinforcement Learning process. As input, it receives an XML file with the parameters of the experiment. As output, it generates log files and, if asked to, visualizes the experiment in real time.

Setting Up Visual Studio

This project is developed using Visual Studio 2017 Community for all the target platforms: Windows (x86/x64) and Linux (x64).

Components

The following components need to be installed from the Visual Studio Installer if you want to compile the projects straight away (in the order they are listed in the installer):

  • .NET Framework Targeting Pack 4.5.2 (or either retarget C# projects)
  • Git for Windows
  • NuGet Package Manager (to automatically download some dependencies)
  • VC++ 2017 version 15.9 v14.16 latest v141 tools (or either retarget C++ projects)
  • C# and Visual Basic
  • Visual C++ for Linux Development
  • Visual C++ tools for CMake and Linux
  • Windows 10 SDK (10.0.17134.0) (or either retarget C++ projects)
  • GitHub Extension for Visual Studio (recommended)
  • Microsoft Visual Studio Installer Projects (only required to create the Windows Herd Agent installer)

Windows compilation

All the C# projects and all the C++ projects targeting Windows (those without -linux in the name) should compile straight-forward. Just select the target (Debug/Release and x64/x86), right-click on the solution and click on Build solution.

Linux compilation

Visual Studio compiles Linux sources using a remote Linux machine that receives the source code and returns the generated binaries via SSH. To compile the source code for Linux, the connection to the Linux machine must be added in: Tools->Options->Cross Platform->Connection Manager

We are currently using a Virtual Machine that can be downloaded from here. The connection parameters to c0nnect with this VM are:

  • Host name: 192.168.56.101
  • Port: 22
  • User name: simionzoo (same as the password)
  • OS: Ubuntu (x64)

If you want to use your own machine, you need to install the following VSLinux dependencies:
sudo apt-get install openssh-server g++ gdb gdbserver
and OpenGL/FreeGlut-related dependencies: sudo apt-get install libgl1-mesa-dev libglew-dev libxi-dev

About the source code

The folder structure is described here

The basic programming rules are given programming rules.

Here you can find how to set directories in new projects and some Visual Studio 2015/2017-related stuff. A mini-tutorial on how to use GitHub from Visual Studio 2015/2017 here.

Clone this wiki locally