Giter Club home page Giter Club logo

goabe's Introduction

goabe

go agent based engine

Getting started

Install go version 1.21 or later.

Building

To build the goabe binary, including running go generate, just use make!

make

Configuration

To generate your starting config file, do something like:

./goabe --threads 2 config create

Now you can edit goabe.json or rename it and reference it with the --config option, e.g.,

./goabe rune --config myconfig.json run --steps 10 --threads 10

Plugins

Plugins are autodiscovered by the script in cmd/build_registerPlugins.bash. It expects to find a directory with a .go file whose basename matches the directory name. In that file, there needs to be functions Init, Name, Version, Description, PreRun, PostRun. The script just checks for those words using pattern matching, not any examination of the go parse tree.

The command to generate the plugin registration code is autorun by go generate via make. You can do this yourself with:

./cmd/build_registerPlugins.bash

You probably want to redirect this to the .go file, e.g.,

./cmd/build_registerPlugins.bash > cmd/registerPlugins.go

Or just let go generate do it:

go generate -v ./cmd

Life plugin

This is a simple example of Conway's Game of Life. It supports arbitrary sized matrices and standard rules. It can read and write basic RLE files. Note that .LIF file format was removed, but could be found in git history.

RLE data

Catalog is here: https://catagolue.hatsya.com/home

The in.rle file contains a basic pattern with a three step repeat. It can be used with a goabe.json file like the following that specifies life.in_filename and life.out_filename.

{
  "life": {
    "in_filename": "in.rle",
    "out_filename": "out.rle",
    "x_size": 16,
    "y_size": 16
  },
  "log_file": "goabe.log.json",
  "log_level": "INFO",
  "random_seed": 42
  "substeps": 10
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.