Pages: 1 [2] 3
|
 |
|
Author
|
Topic: Thoughts on rewriting the AI (Read 7631 times)
|
Valaggar
Guest
|
Yeah, keep up the good work. Don't mind the people requesting Kzorz-Za Nemeses on the Cafe - don't mind me either requesting them, which I surely will. In fact, don't even POST anymore ideas like that one. AI is a better project.
|
|
|
Logged
|
|
|
|
Smaug
Zebranky food

Offline
Posts: 23

I love YaBB 1G - SP1!
|
Honestly?
If you guys are serious about improving the AI in the game, then you need to make it easier for people to do the work.
What you need is a single mod that you don't need grand C++ experience in order to get in there and adjust. And the best way I can think of to do that is to invoke a scripting language. My recommendation would be Lua.
The idea would be that the code would call a Lua script for each frame, and the Lua script would be able to ask questions (where is the ship, are there any space objects in this region of space, how fast am I going, etc) of the game and give their own ship commands (turn, fire, etc). The way I'd design it is such that there could be a single Lua script for every matchup, but if a script for a particular matchup isn't found, then the game goes to the standard ship script, and if that isn't found, it goes to a generic one that can work for all ships (but shouldn't work very well).
Lua as a language is a lot more fogiving than C++, and because it's executed at runtime, you can even change scripts in the middle of battle without needing to recompile them. This makes it much faster in terms of development of a good AI, since you don't have to stop the program, make your change, recompile, run, start Super Melee, select the fleets, and start the battle. The biggest difficulty is going to be creating a good script interface. That is, exposing appropriate script functions so that it can ask useful questions (is there a space object that will hit me if I keep going, can I dodge it in time to avoid the damage, etc). Once you work out a decent list of questions (and the best way to do it is to get a bare-bones script working, and then try to make a good AI. When you start needing to test things that there is no API function for, write one), you're pretty much ready to go.
Really you don't need all 625 different pairs in the end. Ship-based generic ones can handle a lot of the variation, but there are going to be certain encounters for certain ships that will require a hand-tuned approach.
|
|
|
Logged
|
|
|
|
|
|
Death 999
Global Moderator
Enlightened
    
Offline
Gender: 
Posts: 3876
We did. You did. Yes we can. No.
|
Are your genetic algorithms going to include 'sexual selection', i.e. nontrivial means of choosing pairs for crossbreeding?
|
|
|
Logged
|
|
|
|
|
Death 999
Global Moderator
Enlightened
    
Offline
Gender: 
Posts: 3876
We did. You did. Yes we can. No.
|
Though that's good, it's not what I meant.
I meant, do you have these AI's have any features not related to their performance which determine which AI's mate? Sexual selection can be useful to help 'valley-crossers' get where they're going, and can eventually bring about speciation.
Just a thought.
|
|
|
Logged
|
|
|
|
|
Death 999
Global Moderator
Enlightened
    
Offline
Gender: 
Posts: 3876
We did. You did. Yes we can. No.
|
No, the AI's which fly the ships.
|
|
|
Logged
|
|
|
|
|
Death 999
Global Moderator
Enlightened
    
Offline
Gender: 
Posts: 3876
We did. You did. Yes we can. No.
|
That's good, and even better, but it's still not what I meant: you're still basing it off of survival advantage (combat performance).
Real organisms have additional selection criteria. Like, are pretty girls more capable of surviving? No; but they are more likely to reproduce. In the same vein, you are unlikely to attempt to mate with a chimpanzee, no matter how attractive that chimpanzee is to other chimps.
In other words, it may be useful to keep some clusters together by factors other than environmental selection.
|
|
|
Logged
|
|
|
|
|
Death 999
Global Moderator
Enlightened
    
Offline
Gender: 
Posts: 3876
We did. You did. Yes we can. No.
|
They are beneficial, in that your AI's may 'speciate' and form populations which do not mix anymore because they are too different in internal structure.
Also, they may learn not to mate with AI's that are just like themselves (incest taboo).
|
|
|
Logged
|
|
|
|
|
Death 999
Global Moderator
Enlightened
    
Offline
Gender: 
Posts: 3876
We did. You did. Yes we can. No.
|
Overall strategies. If one is trying to dance at the edge of range and the other is trying to slingshot to get on the enemy's 6, crossing them would kill both. There would be certain ways of combining them to make it stronger (make them sort of sub-behaviors within a larger AI), but it wouldn't be the same old mix and mate.
This would give alternate strategies time to grow into their own before being brought back into any hegemonic structure that may emerge... that is at a local optimum.
|
|
|
Logged
|
|
|
|
Pages: 1 [2] 3
|
|
|
|
|