GithubHelp home page GithubHelp logo

hornet_field's Introduction

A field of hornets

GPLv3 License
black pylint mypy pytest pytest-cov

In the "Survivorship Bias" episode of the "You Are Not So Smart" podcast, an analogy was made about bomber crew in WWII being like shirtless runners in a field full of hornets. They might get through unharmed once or twice. But they are bound to get stung if they keep going back and forth.

Got me thinking what is the probability of the shirtless person getting through and if he has any chance of applying skill to survive or was it all stochastic chance.

So here it goes, a stupidly unrelated simulation:

  • A field.
  • A group of hornet agents that move in the field.
  • A traveling agent that aims at getting from one side of the field to the other side.

Example

Entry point examples:

python3 -m main
python3 -m main --field-size 2400 1800 --hornet-count 1000
python3 -m main --save-to-file --max-iteration 800

  • Behavior Mode (for both traveler and hornet) is derived from Cartesian product of:
    • sensing capability: {with and without}
    • motion planning: {random, intelligent (rule-based, heuristic, algorithmic AI, etc) , intelligent-learning-based}
  • Adversarial Learning Mode: also train the attacker agents and iterate

Tests, coverage, linter, formatter, static type check, ...

$ black . --check
$ isort . --check-only
$ mypy . --explicit-package-bases
$ pylint $(git ls-files '*.py')
$ xvfb-run --auto-servernum pytest
$ xvfb-run --auto-servernum pytest --cov=.
$ xvfb-run --auto-servernum pytest --cov=. --cov-report html; firefox htmlcov/index.html

License

Copyright (C) Saeed Gholami Shahbandi

NOTE: Portions of this code/project were developed with the assistance of ChatGPT, a product of OpenAI.
Distributed with a GNU GENERAL PUBLIC LICENSE; see LICENSE.

hornet_field's People

Contributors

saeedghsh avatar

Watchers

 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.