Menu

Home

Kevin Baas

2012.07.21

REPOSITORY MOVED TO GITHUB: https://github.com/happyjack27/SwarmWars

2012.01.06
TODO v.2 (categorized)

==ui==
* add shadows on organisms?
* need ability to improve generally w/time (level play)
* ability to build/construct - give organisms this ability? < that is for later
* ability to provide cash reward for actions, or punish for them. organisms will autotrade for what they want/need
* can control target ratios of abilities. min and max
* (ones at max won't breed. if any get to min, only ones at min breed)
* ability to control reward/punish vector. reward/punish vector is part of input (or at least some of it) so the organisms respond to changes in it.
* also ability to control movement biases, etc. e.g. contract/expand. retreat/engage.
* diplomatic status can be demoted by either player, but only promoted by mutual agreement.
* players are discovered by an organism coming into proximity.

==research==
* research improvements (new building: research, new unit types (roles)) - dps,speed,range,constr, storage, brain power, new buildings, etc...
* genetics research lab
* gene research lab also enables cyrogenics, dna reconstruction (stealing evolution)
* building research lab

==buildings==
* constr materials: wood, metal
* organisms must gather resources for building.
* buldings include: incubator, hospital, greenhouse, turret, wall...

==organisms==
* no armor
* rangedpsstoragetop speedhpconstr.melee efficiency=1
* roles: soldier, builder, gatherer, scout...
* silo, turret, tank...
* all can trade. some can't attack or build or gather...
* roles turn on/off abilities (and thus multipliers)?
* appearance based on abilities. so is rewarding.
* attack attributes: armor, hp, range, rate, dmg, as multiply to 1.
* though what they multiply to can be improved by correct parity bits?
* also completely different organisms, w/diff appearance, as traits
organisms should get feedback on how much damage they do
* also redistribute wealth at constant rate. (tax & spend!) use progressive tax.
* implement growth. (initial size, growth rate, growth function) affects top speed too?
* add living organisms lifetimes to avg. lifespan. if health full, twice as long as they've lived.
* if health not full, as much to empty health at rate its emptied. = (lived so far)
(full health)/(full health - current health)
* add "double" recessive trait, which doubles mass, weap, armor, and size. requires all 1's in bit.
* allow auot-trading of resource.
* behavior Trait[] buy_price 0-1 (logarithmic) (1-8)
* behavior Trait[] profit_target 0-1 (logarithmic) sell price as multiple of buy price
* start w/zero, have a max debt.

==other==
* warp gates between maps

  • move reuse queue to inside the classes being reused (make it static)
  • change landscape to be stored as scaled integers. (i.e. fixed point) for better accuracy and faster compute time?

  • add time for plants that they are underground before appearing on grid (age)

  • climate parameters effect movement speed, energy usage of organisms, fertility requirements, lifespan of plants.
  • coevolution of plants - germination radius, spread radius, temperature preference, humidity preference, color adjustment, mass/size, plus a mass density.
  • also give them possible medicinal value - make energy and medicinal mutuallly exclusive
  • plant evolution: tradeoff: faster procreation means lower density. (cause needs more energy)
  • lifetime can be free variable, so can spore radius.
  • camouflage? - color's proximity to local color affects visibility?

  • make a differential quad-tree class

  • keep a running average genome, and add that to offspring?
  • add genes to enable/disable behavior inputs for faster thinking?

2012.01.04

much progress has been made. i figured i'll just publish my to do / done list:


TODO

T move reuse queue to inside the classes being reused (make it static)
T change landscape to be stored as scaled integers. (i.e. fixed point)
T use kernels for all landscape operations
T add radius (or 1) to distance to prevent singularities.
T make kernels for convolutions and grid updates

T add time for plants that they are underground before appearing on grid (age)
T climate parameters effect movement speed, energy usage of organisms, fertility requirements, lifespan of plants.

T plant evolution: tradeoff: faster procreation means lower density. (cause needs more energy)
T lifetime can be free variable, so can spore radius.
T camouflage? - color's proximity to local color affects visibility?

T plant grid seems broken
T make a differential quad-tree class
T keep a running average genome, and add that to offspring?
T add genes to enable/disable behavior inputs for faster thinking?

T implement growth. (initial size, growth rate, growth function) affects top speed too?
T implement walk/run switch w/energy tradeoff (walk is twice as efficient, half the speed)
T implement coarse gridding for organisms
T diplomatic status can be demoted by either player, but only promoted by mutual agreement.
T players are discovered by an organism coming into proximity.

T make habitat variation (eg. hot/cold, dry/wet) for speciation / adaptation.
T make it so that can vary over time, too.
T make coarse grid for organisms (organism sees 3x3. use hashtable for bins?)

T allow auot-trading of resource.
T behavior Trait[] buy_price 0-1 (logarithmic) (1-8)
T behavior Trait[] profit_target 0-1 (logarithmic) sell price as multiple of buy price
T start w/zero, have a max debt.

T add living organisms lifetimes to avg. lifespan. if health full, twice as long as they've lived.
T if health not full, as much to empty health at rate its emptied. = (lived so far)*(full health)/(full health - current health)
T add "double" recessive trait, which doubles mass, weap, armor, and size. requires all 1's in bit.
T coevolution of plants - germination radius, spread radius, temperature preference, humidity preference, color adjustment, mass/size, plus a mass density.
T also give them possible medicinal value - make energy and medicinal mutuallly exclusive

T world grid gets out of whack - need to reset it periodically by removing all resources, seting grid to zero, adding all resources. also look into the cause. i think things are being added below their initial mass and then being removed at their initial mass.


DONE

D make plants use scheduler
D create landscape class, which can create random, convolve, scale, add, make brownian landscape, exp, add to landscape, etc.
D then create climate class, whcih stores a landscape for: temp, humidity, fertility, elevation.
D make worldgrid use landscape.
D move priority queue to itemporal.

D add grid refresh function - sets grid to zero, set last update weight to zero, updates all.
D implement mass_at_last_update on resource logic.
D plants: add generator (non-edible plant), spawn time, spawn distance (gaussian)

D make showgrid a keyboard shortcut

D introduce alignment (-1,0,1) can only attack enemy, neutral, can only breed friendly, neutral. null player = neutral
D add alignment to input vectors / move vectors, including null=neutral
D give players alignment vectors. if player is not in vector, then is neutral.
D change organism move vectors to base + alignment modifier.

D everyone starts out enemies.
D combine attack & breed targets to attack/breed + attack/breed aligment modifier. because e.g. weapon size might be attack target and breed target.
D combine and attack and breed state into one signed modifier?

D make herbivores and carnivores - make meat food red, veg food green. veg food constant. meat food whenever animal dies
D maybe disable signal mimicing?

D change eat state to consume resource and consume food state, so can pick which to eat based on energy value.
D must see own armor and weap size for proper reaction!

D make plant/meat preference a single variable.
D healing requires equal parts energy and medicine.

D make energy level visible
D implement mate selection- pick random breeding, check if most elgibable bachelor is compatible

D evolve output for relative velocity mimicking.
D can have more than 1, but then efficiency goes down. sum of efficiencies = 1, so favors specialization.
D make armor and melee. (dont need to be able to eat them, at first)


CANCELLED

N make at least 3 different food types, w/food type selector, for mutual coexistance - make as different resource types.
N when die become a certain type of food, or portions thereof. (ideal to not be type that u eat, cause then r food for ppl in your area)
N make it like rock scissors paper? r->g->b, or r,anti-red,etc. = 6 types? or 4?


2011.12.28

got the basic instinctual behavior normalized. meanwhile i found some bugs that were making inter-organism communication not work right, which would explain why the brain seemed to break. now i've reactivated the brain and it seems to be working smoothly.

so now i'm adding mimicking. i've constrained the food supply to 1 unit per 2 organisms and they've adapted pretty well. they're territorial now; they save energy by not chasing after food that another organism has a head start on.

so next thing after getting mimicking all coded, is adding in attack and defense.

then at some point i have to reintroduce member-specific, proximity-based breeding rather than the global breeding i'm running now. and w/that evolving mate selection.

and i have some fun ideas after that to work on. lots of stuff in the proverbial pipe.


2011.12.26

so what is this now, a wiki-blog? i guess. i fixed the spatial awareness. really the original formula was fine. force=sum(mass/distance) it basically reflects a relative "density". since circumference grows at 1/r, it will reflect how populated a circumference around the point is; "how much green do i see?". the real problem was that the resource map wasn't being updated properly. thus, the organisms were going towards were resources used to be. their behavior was correct, their information was not. garbage in, garbage out.

so now i'm going to re-activate their spatial awareness of other organisms, and add "mimicking" (and anti-mimicking) to their neural nets. this will provide a shortcut to mob-like behavior and accelerate information transfer. i believe then we will see some real swarming.


2011.12.26

The game is under development. The file release is always going to be older than the SVN release. So I recommend using the SVN instead.

Currently it's only single player and there's no real "play". I'm tweaking the basic game engine right now. Working on the "physics" (class "World") and the neural net/genetic evolution/swarm intelligence of the organism. (mostly class "Organism" now, but also the "Genetics.Behavior" package). On that I'm focusing on making the organisms viable and giving them a small evolutionary head-start, as it were. So their "intelligence" is going to be a bit erratic while i tweak it.

Most notably, I just realized that I have to multiplicativly invert their spatial inputs. (i.e. x = 1/x). That should translate to a huge improvement in their spatial awareness/movement. the spatial gradient functions go like 1/distance^2 and thus have singularities gradients at distance=0, and gradients that approach zero as distance approaches infinity. The situation should be reversed: they should go like distance^2, resulting in gradient=0 at distance=0 and gradient approaches infinity as distance approaches infinity. This translates to i.e. when they're out in the middle of the desert, they want to get out of their fast, and when they're in a luschous garden they can take their sweet time. I might have multiple different spatial gradient functions per source. Still thinking/playing.

Anyways, the organization of the code should be pretty self-explanatory. Feel free to reuse parts of it for whatever you like. And i'll try to update this status info periodically.

Oh, and the graphics will get better. right now you just see place-holders so i can work on the game logic.

Oh, and back-propagation isn't implemented yet. It still only learns by genetic evolution. I'm leaving that for after I get the neural network, its input/output, and the world physics satisfactory. 'cause i'll have to tweak some parameters on it and i'd rather not try doing that blind.

Project Admins: