kind = combinational
hint_kind = combinational
max_delay = 10
max_gate = 40
size = 46
cycle_past_fail = 0xff
unlocks_components = [com_inc]
unlocks_pages = ["Circuits/Delay"]
title = (31337_85893273691863, `Objective beauty`)
dialogue = [
  (mentor_centered, (31337_78375324732864, `Useful energy, known as exergy, is finite and if we consume it all, we will be at the heat death of the universe. This is why efficiency is important.

In our society, we find inefficiency ugly and efficiency beautiful.

In fact, we measure beauty in units of energy.`)),
  (mentor_centered, (31337_34375498293137, `This level introduces efficiency scoring, which is based on time and energy.`)),
  (mentor_centered, (31337_70169388789757, `These equations are equal, yet not the same:

((A + B) + C) + D
(A + B) + (C + D)

They produce the same result, but parallelism allows one to be faster than the other.`)),
  (mentor_centered, (31337_59781832788691, `Each of the basic gates (NAND, NOR, AND, OR) have a delay of one, meaning they take a unit of time to complete.

However, different parts of a circuit can happen simultaneously, so we only have to wait for the slowest path, called "the critical path".

Click the hourglass in the upper right to see the critical path.`)),
  (mentor_centered, (31337_72877144436007, `Each of the four basic gates consume one unit of energy in each unit of time.

So the total energy cost of your solution is the delay of the critical path multiplied with the number of fundamental gates used.`)),
  (mentor_centered, (31337_40775045205647, `The cost of the components you have unlocked are based on your score in the levels where you unlocked them.

If you want to improve the cost of a component, you can go back and optimize your solution in the level that unlocks it.

In fact, to beat this level, your XOR gate should cost 3 gates and have a delay of 2.`)),
  (mentor_centered, (31337_38383835706006, `To solve this level, add 1 to the input number and output the result.

If the result doesn't fit in 8 bits, discard the bit that doesn't fit.

Do this with no more than 40 gates and 10 delay.`))
]
