SOMAS2020

command module
v0.0.0-...-95be186 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 8, 2021 License: BSD-3-Clause Imports: 19 Imported by: 0

README

SOMAS 2020

Main repository for Self-Organising Multi-Agent Systems (SOMAS) Coursework for 2020, Imperial College London.

Running code

See Setup & Rules for requirements.

# Approach 1
go run . # Linux and macOS: Use `sudo go run .` if you encounter any "Permission denied" errors.

# Approach 2
go build # build step
./SOMAS2020 # SOMAS2020.exe if you're on Windows. Use `sudo` on Linux and macOS as Approach 1 if required.
Parameters & Help
go run . --help
Output

After running, the output directory will contain the output of the program.

  • output.json: JSON file containing the game's historic states and configuration.
  • log.txt: logs of the run
Visualisation Website

See website/README.md

WebAssembly Build

Scripts provided to compile the program into WebAssembly for the website.

If you have node
node ./website/scripts/buildWasm.js
Otherwise

On Linux/maxOS,

./build_wasm.sh

On Windows,

build_wasm.cmd

Testing

go test ./...

Structure

docs

Important documents pertaining to codebase organisation, code conventions and project management. Read before writing code.

internal

Internal SOMAS2020 packages. Most development occurs here, including client and server code.

  • clients Individual team code goes into the respective folders in this directory.

  • common Common utilities, or system-wide code such as game specification etc.

  • server Self-explanatory.

pkg

More generic packages dealing with general use-cases, such as system-related or file-operation utilities.

website

Source code for visualisation website.

Documentation

Overview

Package main is the main entrypoint of the program.

Directories

Path Synopsis
internal
clients/team1
Package team1 contains code for team 1's client implementation
Package team1 contains code for team 1's client implementation
clients/team2
Package team2 contains code for team 2's client implementation
Package team2 contains code for team 2's client implementation
clients/team3
Package team3 contains code for team 3's client implementation
Package team3 contains code for team 3's client implementation
clients/team4
Package team4 contains code for team 4's client implementation
Package team4 contains code for team 4's client implementation
clients/team5
Package team5 contains code for team 5's client implementation
Package team5 contains code for team 5's client implementation
clients/team6
Package team6 contains code for team 6's client implementation
Package team6 contains code for team 6's client implementation
common/config
Package config contains types for the configuration of the game.
Package config contains types for the configuration of the game.
common/gamestate
Package gamestate contains information about the current game state.
Package gamestate contains information about the current game state.
common/shared
Package shared is used to encapsulate items used by all other packages to prevent import cycles.
Package shared is used to encapsulate items used by all other packages to prevent import cycles.
server
Package server contains server-side code.
Package server contains server-side code.
pkg
fileutils
Package fileutils contains utilities for file operations.
Package fileutils contains utilities for file operations.
gitinfo
Package gitinfo gets information about the git repo.
Package gitinfo gets information about the git repo.
logger
Package logger provides a Writer implementation to be used for log.SetOutput to enable logging to multiple streams.
Package logger provides a Writer implementation to be used for log.SetOutput to enable logging to multiple streams.
miscutils
Package miscutils provides miscellatenous utilities.
Package miscutils provides miscellatenous utilities.
sysutils
Package sysutils contains system-related utilities.
Package sysutils contains system-related utilities.
testutils
Package testutils contains useful test utilities Based on https://github.com/facebook/openbmc/tools/flashy/tests/testutils.go Original author: lhl2617, Facebook, (GPLv2)
Package testutils contains useful test utilities Based on https://github.com/facebook/openbmc/tools/flashy/tests/testutils.go Original author: lhl2617, Facebook, (GPLv2)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL