initial bot algorithm