Eufloria > Eufloria Classic Mods

Logic map for a level I'm working on...

(1/6) > >>

annikk.exe:


Embedded in a while GameRunning() loop, each game "cycle" an asteroid belonging to the AI is selected at random, and a series of logical checks are made as shown in the flow chart above, ultimately resulting in action or inaction.

The code for this is about 50% complete.  The code must be 100% complete before a significant testing and adjustment period will begin.

Hope to have a new map with a brand new AI ready within the next few weeks.. :>

Alex:
Good luck with this, I am going to get back on the wagon soon hopefully and maybe some of the functions you've asked for will go in and help you with this.

annikk.exe:
Awesome :>  Really looking forward to being able to create a solar system, I have the maths for it all figured out already.  :>  I am also quite tempted to try to create a reusable mathematical model of gravity.  Technically it's already possible to calculate gravitational forces acting on each asteroid, but moving asteroids would be needed in order to reflect it.


Anyway, for now I am still working on this new AI.  Last night I finished off the extremely complicated metric calculation section, which is responsible for identifying which paths the AI might like to send a given asteroid's seeds along.  It has a lot of similarities with computer networks, actually..

In terms of coding the actions, I've covered every possible branch up to the "Elligible for reinforcing other roids!  Is my torch metric nil?" part.  So currently the AI is still pretty useless - it will make its asteroids "call for help" if attacked, but it won't send seedlings to assist neighbouring asteroids when they call for help.  It will build the maximum number of trees on its starting asteroid(s), but it will never send seeds out to colonise a new asteroid.  Neither will it send an army to defend an asteroid attacked by the player.  Neither will it hold elections to set a gather point, or attack any of the player's asteroids.

I also realised the AI is vulnerable to having its empire split.  If one part of the empire has no way of reaching the other half, whichever half has the gather point will be the only half used for attacks against the player.  This gets to be a real problem if one AI asteroid is left on its own.  It could potentially win a gather election and become the new gather point, but with no friendly neighbours it will be inaccessible to the seedlings in the rest of the AI's empire, and they will simply wait at their asteroid of birth until the player tries to attack, at which point they will respond.
The point is that the attack-the-player functionality will be severely compromised if this situation arises.  I will need to think of a good way to figure out whether a split has occurred, and which side of the split is largest.  Quite tricky when the code is designed to only analyse one asteroid at a time..



I don't really expect anyone to read this by the way, but I need to type this out so I remember all this stuff tonight :P

annikk.exe:
Finished the initial coding last night.  I'm using a previous level I made as a test bed for the AI code, which is now over 500 lines.  Fired the level up and it didn't load at all due to syntax errors.  :P

So I fixed all the syntax errors, and then the level loaded, and predictably the AI did nothing at all.  Absolutely squat.   :>

So I spent some time bugfixing and then the AI built 3 trees on his asteroid, but for some reason would not build a 4th.

After a bit more time messing about with it I've managed to get them to build 4 trees....not sure what was wrong with it before but at least there is the expected behaviour now.  Unfortunatley after it has built 4 trees, the AI does nothing.  This is most likely because of 2 key sections I have had to comment out because they were causing the While loop to break.


So currently the AI is not really working... maybe tonight I will figure out how to make the other sections work and then with any luck I will be left with an AI that is merely very stupid.  :D
Then for some tuning, and hopefully stupidity level will decrease...

lecutus88:
Can I ask what you do for a living, please?  Your coding knowledge and logical approach does you massive credit, not to mention your creativity and tenacity!   I dabble in code myself and know it can be addictive, but struggle for time to engage in anything has heavy as Eufloria levels!

Navigation

[0] Message Index

[#] Next page

Go to full version