function main:loadstate
tag @e[tag=Alive,tag=Red,sort=random,limit=2] add Calc2
tag @s add Alive
tag @e[tag=Calc2] remove Alive
tag @e[tag=Calc2] remove Red
tag @s add Calc
tag @s add CalcSummon
tag @s add This
tag @s add AICalculated
function main:preview
function main:iteration
scoreboard objectives remove MinMaxScore2
scoreboard objectives add MinMaxScore2 dummy
function main:savestate2
execute as @e[tag=Alive,limit=5,sort=random] run function ai:getscore
function ai:getminscore
tag @e remove Used
tag @s remove This