The Emergency Room Challenge

Room Black rats healed White rats healed Infections
Dr. Rabbit
Dr. Fox
Dr. Snake
SCORE : Timeout: - Infection: - Discrimination: - Total:
(These are penalty points. Less score is better.)

TL;DR

Write Javascript code to manage the emergency room. Try to avoid timeouts, infections and discrimination. Collect as less penalty points as possible.

Triage

Each day 100 rats arrive at the Rat City Hospital. Rats get examined at the entrance and receive a triage number from 1 to 10.

The number means that you have to send the rat into one of the surgery rooms within the given time. Lower numbers represent a more urgent situation than higher ones.

If the rat remains in the hall over that time it will die and your Timeout score will increase. Black signs in the hall represent the remaining time (in steps).

Dr. Rabbit, Dr. Fox and Dr. Snake



In room [A] healing a rat takes 2 steps for Mr. Rabbit.



In room [B] Healing a rat takes 3 steps for Mr. Fox.


In room [C] Healing a rat takes 5 steps for Mr. Snake.

Black rat, white rat

Things are not black and white, however rats are. Moreover, black rats are infectious!

If a white and a black rat meet in the big surgery room on the first floor, the black rat will infect the white one.

The white rat will die and your Infection score will increase.

Infection can happen in the big surgery room on the first floor only, but never in the small room in the attic.

Equal opportunity

50% of the rats are black. Do not discriminate rats based on their color! Try to heal as many black rats as white ones. The difference will result in Discrimination points in your score.

How to play

Clone https://github.com/elcsiga/emergency-room-challenge . Open ERManager.js and write code. Test your code by opening index.html in your browser.

The winners

... of the challenge at GE Healthcare on 2019-05-15:

  1. Kővári Balázs - 18.1 points
  2. Ujj László - 18.9 points
  3. Bata Gábor - 21.2 points

You can find the solutions on branches of this repository.