GithubHelp home page GithubHelp logo

musurca / sandman Goto Github PK

View Code? Open in Web Editor NEW
4.0 3.0 3.0 451 KB

Fatigue modeling for Command: Modern Operations

License: GNU General Public License v3.0

Shell 2.46% Python 1.19% Lua 96.35%
fatigue wargame pilot

sandman's Introduction

SANDMAN

Fatigue modeling for Command: Modern Operations

What is SANDMAN?

SANDMAN models the current fatigue level of your pilots using a realistic model based on their sustained activity, sleep debt, and circadian rhythms, then degrades their proficiency accordingly. With SANDMAN, you may also see exhausted pilots taking short, dangerous "micronaps" in which their plane goes out of comms, and becomes vulnerable to enemy action. Extremely exhausted pilots may even begin to bolter/go-around on landings, or even (under very rare conditions) crash.

Using the Fatigue Avoidance Scheduling Tool (available from the Special Actions menu), you can monitor the effectiveness of your pilots, and attempt to stand down particularly exhausted pilots for rest.

How do I add it to my scenario?

  1. Download the latest release.
  2. Open your scenario in the Scenario Editor.
  3. Go to Editor -> Lua Script Console
  4. Paste the contents of the file sandman_min.lua into the white box, then click Run.
  5. Complete the SANDMAN wizard and voila! You now have sleepy pilots.

If I want to tweak the model, how do I build it from source?

You'll need the following installed on your system:

Quick prerequisite install instructions on Windows 10

Assuming you've installed the WSL and Ubuntu, run the following commands from the shell:

sudo apt-get install python3 npm
sudo npm install -g luamin

How to compile

Release
./build.sh

The compiled, minified Lua code will be placed in release/sandman_min.lua. This is suitable for converting scenarios by pasting it into the Lua Code Editor and clicking RUN as the final step in the scenario creation process.

Debug

./build.sh debug

This will produce compiled but unminified Lua code in debug/sandman_debug.lua. Do not use this in a released scenario. This is mostly useful while debugging your code.

Why is the build process so complicated?

SANDMAN works by injecting its own code into a CMO LuaScript event action which is executed upon every scenario load. The build process converts the SANDMAN source into a minified, escaped string which is then re-embedded into its own code.

Version History

v0.2.2 (?????):

  • fixed: compatibility with IKE

v0.2.1 (3/8/2022):

  • fixed: much higher than intended crash incidence

v0.2.0 (3/6/2022):

  • added: reserve crews
  • added: reserve display and replacement thresholds
  • added: global timezones
  • added: multicrew model
  • added: crews of planes under maintenance/reserve placed in reserve
  • changed: FAST shows peak awareness time for pilot
  • changed: FAST shows actual proficiency based on effectiveness
  • changed: FAST shows pilots in selected bases
  • changed: proficiency drop now an absolute delta
  • changed: UAVs will never micronap
  • changed: UAVs get 2x reserve crews
  • changed: enable fatigue tracking by side in wizard
  • changed: set model values by side in wizard
  • changed: calling Enable/Disable() adds & removes special actions
  • changed: update called on prime number intervals
  • changed: circadian term cached
  • changed: API functions match CMO standard
  • fixed: implemented custom PRNG to replace math.random()
  • fixed: array table storage

v0.1.1 (2/10/2022):

  • added: API functions for scenario authors
  • changed: increased micronap risk
  • fixed: reinstalling SANDMAN resets proficiencies

v0.1.0 (2/9/2022):

  • Initial release.

sandman's People

Contributors

musurca avatar

Stargazers

 avatar  avatar  avatar  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.