FANDOM


Fool
Fool
Wandering Fools

Author

Warren

Strategy

Evasive theotroph

Last modified

7/5/2002

Fool is an influential early theotroph that is known for being smart and fast. Fool was one of the first sides to use food-sharing techniques. Its robots detect if they are pushed off food and proceed to search elsewhere.

FileEdit

#side Fool
#Author Warren
#date Started May 27 2002

A one-type theotrophe.

#color 362
#type Foolish
#color 211
#hardware
energy 300 50
armor 100
processor 8

constructor 1.2 ;c 120
eater 2.0 ;c 200
engine 0.1 ; c 100
solar-cells 0.02 ;c 36

food-sensor 10
;robot-sensor 10
;shot-sensor 10

#code
#var begin-moving-time
#start
0.1
BeginWandering: ;on stack: speed
 random-angle polar-to-rect engine-velocity!
 time begin-moving-time!
do
 energy 30 speed 100 * - < 0 engine-max-power ifev engine-power!
 food-sensor-time 30 + time < time 5 < or energy 20 > and if
  random-angle food-sensor-focus-direction!
  0 5 random food-sensor-focus-distance!
  fire-food-sensor sync
  food-found BeginFoodCharge& ifg
 then
 construct^
 defend^
 0.1 speed 0.08 < time begin-moving-time 10 + > and BeginWandering& ifg drop
;must have bumped something
forever

BeginFoodCharge:
 time begin-moving-time!
do
 food-position position v- 0.06 vs* engine-velocity!
 engine-max-power engine-power!
 construct^
 defend^
 food-position position v- norm radius 0.05 + < BeginEating& ifg
 0.15
 time begin-moving-time - dup 100 > swap 30 > speed 0.03 < and or
BeginWandering& ifg drop ;must be something in way
forever

BeginEating:
 0 0 engine-velocity!
 engine-max-power 0.1 * engine-power! ;try and sit still
 sync ;wait to get in position
do
 construct^
 defend^
 0.1 eaten BeginWandering& nifg drop
forever

BeginRunning:
1.0 BeginWandering& jump
do

forever

Construct:
 1 constructor-type!
 energy 50 < 0 constructor-max-rate ifev constructor-rate!
return

#var last-armor 0
defend:
 energy 25 > if
  armor armor 50 < 1 1.05 ifev * last-armor < if
   rdrop armor last-armor! BeginRunning& jump
  then
 then
 armor last-armor!
return

#end

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.