Giter Site home page Giter Site logo

ant-colony's Introduction

ant-colony

Coding exercises featuring simple agent-based AI

Build / install

Install npm.

sudo npm install grunt

git clone --recursive [email protected]:merlinND/ant-colony.git
cd ant-colony
npm install --dev .

# Start grunt watch
grunt

The compilation steps will run automatically on start.

Levels

Level 1

Introduction to the framework, just run the provided code.

Level 2

Introduction to functions and variables:

  • receive several arguments
  • compute euclidean distance and return it
  • could show that if they get it wrong, behavior changes (e.g. going to furthest food instead of closest)

Level 3

Introduction to conditions: receive a food item with several properties: age, poison. Should return true only if the food item is edible.

Level 4

Introduction to loops: return the closest food in given list of foods (keep track of minimum).

Level 5

Loops and conditions: call your is_edible function to only return the closest that is edible.

Deployment

On an Ubuntu 16.04 web server:

sudo apt-get install npm
sudo npm install -g pm2 grunt

# Allow port 80 to be bound without sudo
sudo apt-get install libcap2-bin
sudo setcap cap_net_bind_service=+ep $(which node)

cd /var/www
git clone --recursive [email protected]:merlinND/ant-colony.git
cd ant-colony
npm install --dev
# Compile the application
grunt browserify

# Start the app, pm2 will restart it if needed when rebooting, etc
pm2 start ecosystem.config.js --env production

Pulling the latest changing, rebuilding and reloading the app:

git pull && grunt browserify
pm2 start ecosystem.config.js --env production

Credits

ant-colony's People

Contributors

christianmct avatar merlinnd avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

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.