Destroyed building (windows)

Inputs

  • Are windows defective? (1/0)
  • Price of repair windows

Outputs

  • Price of repairs

Neuron type

Best algorithm has been found - locked

Patterns

Pattern Input Output
1.
Are windows defective? (1/0): 1
Price of repair windows: 100
Price of repairs: 100
2.
Are windows defective? (1/0): 0
Price of repair windows: 500
Price of repairs: 0
3.
Are windows defective? (1/0): 1
Price of repair windows: 1500
Price of repairs: 1500
4.
Are windows defective? (1/0): 0
Price of repair windows: 700
Price of repairs: 0

Applicable neurons

  • 0
  • 1
  • IF
  • a = b
  • Get after substring
  • 180
  • discriminant b² - 4ac
  • character $
  • \\b
  • Convert seconds into HH:MM:SS

Algorithm

Test

Code made by AI:
/**
 * 1: 
 *
 * @return {Array}
 */
function neuron501()
{
return [1];
}

/**
 * a = b: IF a=b THEN 1 ELSE 0;
 *
 * @param x1 a
 * @param x2 b
 * @return {Array}
 */
function neuron591(x1, x2)
{
return [(x1 == x2) ? 1 : 0];
}

/**
 * IF: IF a THEN b ELSE c;
 *
 * @param x1 condition (1/0)
 * @param x2 variable for 1
 * @param x3 variable for 0
 * @return {Array}
 */
function neuron579(x1, x2, x3)
{
return [(x1) ? x2 : x3];
}

/**
 * Destroyed building (windows): 
 * 
 * @param x1 Are windows defective? (1/0)
 * @param x2 Price of repair windows
 * @return {Array}
 */
function neuron598(x1, x2)
{
  var outputs = [];
  outputs[0] = x1;
  outputs[1] = x2;

  arr = neuron501();
  outputs[2] = arr[0];

  arr = neuron591(outputs[2], outputs[0]);
  outputs[3] = arr[0];

  arr = neuron579(outputs[3], outputs[1], outputs[3]);
  outputs[4] = arr[0];

  return[outputs[4]];
}


Code made by AI:

Create your family tree for free