Giter Club home page Giter Club logo

ant-agent-based-model-simulation's Introduction

Overview

This repository contains the work I did on a project focusing on the design and implementation of an Agent Based Model (ABM) to simulate ant behaviour. This project was completed as part of a college module ’Building Complex Computational Models’.

File Description

My code for this creating this model was written in Python and is made up of four main files. These are:

  1. 'ant_simulation_config.yaml'

    • This file contains the parameters used to run the model which can easily be changed.
  2. 'ant_classes.py'

    • This file contains the classes used in the simulation to define objects that occur.
    • These include an Ant, an AntHill, and a Trail.
  3. 'ant_simulation.py'

    • This file defines the agent-based model, and the logic used to simulate the ant environment.
  4. 'gui_class.py'

    • This file contains the class needed to run the interactive GUI in this simulation.
    • This code was adapted from the code contained here. The version in my code has been refactored, reformatted, and updated to tailor it to the requirements of this assignment.

Running the simulation

Running the simulation

The file to run when running this simulation is 'ant_simulation.py'. This the file containing the functionality of my model and calls from all the other files in this repository. This file can be run easily in your chosen IDE or can be run in your terminal/anaconda prompt using the command:

Python ant_simulation.py

This will call up the simulation control panel which will allow you to run the simulation and change the speed settings associated with it.

Changing the parameters

The parameters used in this simulation can be changed in 'ant_simulation_config.yaml'. This file details what each of the parameters means and the meaning of any parameters or any restrictions on the values. Once this file is updated and SAVED, the above command can again be used to simulate the ant behavior using these new parameters.

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.