Grobots Wiki
Advertisement
Baronator
Baronator 1.2 Shot1
A Default hosting two dependent Missiles

Author

Hector

Strategy

Bombarding wanderer heterotroph

Last modified

8/6/2012

Baronator is a recent side by Hector which makes use of non-autonomous missile bots to protect the main gatherers, referred to as Defaults. Version 1.1 had a crippling bug that caused it to build nothing but missiles, but this was fixed in Baronator 1.2 several months later.

Strategy[]

Although this side was designed without much knowledge of advanced game mechanics, it still holds to a basic strategy of trying to discourage combat. Any close confrontation with an active missile will incur dear losses for the attacking side if it does not specifically disable the missile with syphons or long-range weapons. The Defaults will never cease to wander and reproduce, and if they happen to stumble across a heap of recently-exploded enemy corpses, their growth can ramp up to perhaps doubling every 2000 frames. Of note is that missiles, having a rather large explosion radius, sometimes initiate a chain that can reach back to their parents if the missile density is too high, which is why they are limited to two per host.

Development[]

As of December 2012, development on Baronator has been discontinued. The side in its current state could be refined further, but it was mainly envisioned as an experimental missile grower.

Source[]

Version 1.2[]

#side Baronator 1.2
#author Hector
#color 5A2
#comment

Baronator is a pretty simple side. The Defaults (which are basically ripped from the tutorial) protect themselves from
more advanced sides with Missiles (which I designed from scratch). The main focus here are the Missiles. If allowed
to get a decent head start, enough of them will rack up to discourage attack. The imprinting protocols could be fine-
tuned, if necessary, to further customize the choices the Missiles can make regarding target selection.

Works well against newbie sides and colonies. Sorry if it's not modular enough. (I'm new at this!) :P
-Hector, 3/18/2012

(3/18/2012) Gave Defaults more starting and overall energy stores to try avoid losing Missiles to low stores.
Made Missile robot-sensor firings less frequent to slow energy usage. (Abortions no longer occur either.)
Losses now usually only occur when 3+ missiles are hosted by one Default and the Default cannot find food.
Noted that Baronator now almost never has early deaths.

(7/19/2012) Implemented a shared memory system that keeps track of how many missiles each Default has. Every unit will
now evaluate whether or not it should build more Missiles, and Missiles are now more sustainable. They do not imprint
on hosts that already have two.

#type Default ;Summary: Wanders around eating and spawning self or missiles if low, used for missile host as well
#hardware
	engine .05
	constructor 1
	eater 2
	solar-cells .1
	armor 200
	repair-rate .1
	processor 10
	energy 200 150
	grenades 30 15 34 ;Only defense besides missiles
	robot-sensor 15
	food-sensor 8
#code
#vector dest

new-dest:
	0 world-width random 0 world-height random dest!
return

#start
new-dest
do
	0 constructor-type = if ;Avoids abortions, which lose Missiles.
		id read 1 < if ;Each Default builds two missiles for itself first
			2 constructor-type!
		else
			1 constructor-type!
		then
	then
	autoconstruct
	armor max-armor < if
		max-repair-rate repair-rate!
	else
		0 repair-rate!
	then
  	grenades-reload-time periodic-robot-sensor if
		robot-found if
			robot-position robot-velocity lead-grenade
		then
	then
	44 periodic-food-sensor drop
	food-found if
		food-position seek-location
	else
		dest seek-location
		position dest 3 in-range new-dest& ifc
	then
forever

#type Missile ;NEEDS OPTIMIZATION (code and hardware!): Sticks to an imprinted friendly host and locks on enemies
#comment

Stats (UPDATE OFTEN):
Effective range: ~15 units
Mass: 13.1 units
Cost: 695.8 energy
Idle energy usage: 2.4 energy per 20 frames (mostly from robot-sensor firing)

#decoration 050 dot
#hardware
	engine .15
	syphon 2 5
	armor 100 ;Takes a few hits
	processor 35 ;Imprinting and recognization protocols take a lot of steps
	bomb 500 ;cost 125
	energy 50 30 ;cost 35
	robot-sensor 20 10 ;cost 130: Multiple results needed for imprinting to work, long range useful
#code
#var target ;Used to keep track of imprinted host or enemy
#vector dest

new-dest:
	0 world-width random 0 world-height random dest!
return

mark-host:
	target read 1 + target write ;Adds 1 to host's recorded number of missiles
return

unmark-host:
	target read 1 - target write ;Subtracts 1 from host's recorded number of missiles
return

eval-host:
	robot-id read 2 < if
		robot-id target!
		mark-host
	then
return

#start
1 robot-sensor-sees-friends!
1 robot-sensor-sees-enemies!
new-dest
do
	20 periodic-robot-sensor if
		robot-found if
			do
				robot-side side = not robot-mass 22 > and if ;Home in on the enemy forever if it is big enough
					0 syphon-rate!
					robot-id target! ;Imprints enemy
					unmark-host
					do
						enemy-collision energy 1 <= or if
							die
						then
						10 periodic-robot-sensor if
							robot-found if
								do
									robot-side side = not robot-id target = and if
										robot-position robot-velocity seek-moving-location
									then
								next-robot
								while-loop
							then
						then
					forever
				else
					0 target = robot-type type = not and if ;Imprints friendly host
						eval-host
					then
					robot-id target = if
						robot-position 2 - robot-velocity seek-moving-location ;Stay 2 units below the target
						robot-distance syphon-range <= energy 40 <= and if
							robot-direction syphon-direction!
							robot-distance syphon-distance!
							syphon-max-rate syphon-rate!
						else
							0 syphon-rate!
						then
					then
				then
			next-robot
			while-loop
		else
			0 target!
			0 syphon-rate!
		then
	then
forever
#end 
Advertisement