I had this idea for an AI, I have always wanted to be able to play one that is as hard, if not harder than a player. I figured that since an AI is able to do all of the things that a player is able to do there is no reason that the AI could be better, particularly since they are able to compute data very quickly compared to a human, although they do have a bandwidth limit. I proved this point with ComplexAI which can be found at http://springrts.com/phpbb/viewtopic.php?f=43&t=28621.
This idea was designed with the intention of it being coded in C++ but does not really have to be. The design was actually written up by me and a coding friend of mine, however we are more than a little sidetracked with other projects and do not plan on making it anytime soon, if at all; we where hoping that someone may find this of use.
The general idea of the AI is to be able to learn and work with many different games based on config files. We planned it all out with dia and that is what is attached to this post along with an odt of my thoughts of what an AI should be able to do based on the observations of multiple others for Balanced Annihilation.
I hope this helps someone, we would love to see our ideas be useful instead of being locked up on my hard drive for all eternity. Please keep us posted on any use, we would love to know if it was helpful. And of course: These ideas are distributed in the hope that they will be useful, but WITHOUT ANY GARUNTEE; without even the implied GARUNTEE of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
File comment: Our package of ideas. Please note that if you open the dia file and then read the properties of each of the classes we filled in many of the attributes and functions including some descriptions despite the fact they do not show up on the png. SpringAI.7z [83.22 KiB]
Downloaded 10 times
i am pretty sure that nobody will find it here, as it will soon be lost in forum history. but if you add it to the wiki here: http://springrts.com/wiki/AI:Skirmish:List you have the best chances that someone that might be interested in it, would stumble upon it.
I am glad you shared this, as I find it quite an interesting topic.
Metal and energy are mod specific, so to be a fully config based AI, it needs not have specific resource managers but a global "ResourceManager" that handles all resources for the mod. That being said, I would personally do likewise and focus on one particular system.
One thing that is missing is a team cooperation manager. The way I based my AI is that one AI would focus it efforts on a particular task. Such as there would be the following tasks to pick from given the size of the map and amount of players:
- rusher - resource production - techer - raiders/army builders
And then there was the "Overmind" class that analysed the battle and changed team priorities as needed.
There also was the lower level micro based manager, for things such moving units into optimal range, and creating formations etc.
Although the AI is intended to be for any mod and therefor highly configurable, Energy and Metal are the only resources in the API. Although some games may add something as I recall the only way to access those is through LUA in most cases, which we could not have done. That is why we where focused on those two resources.
Secondly I do not believe that we tried to factor in tactics, however it is not a bad idea for future development, although it may be difficult. I personally would try and categorize them into a few options at first and then after observation add in more. The ones I would start with are Turtle, Rush, and Boom; eventually the hope would be to add in mixes that would factor in different tech levels.
The whole path-finding thing was really new to us at the time and, quite frankly, still is; the path finder class would find the best path to take and then the unit would receive the path in the form of a task. It is a great idea to somehow learn the map and that would be a resource held by the knowledge manager and accessed by all of the managers. It is a great idea but it would be a later feature due to its complexity (at least in my opinion). Sorry, I just realized, we actually kind of had this, it is the map manager, although we did not really know yet how we would go about it.
Lastly we had joked about allowing the AI to read user commands during the game since I believe I had seen something in the API that allowed it read the in-game messages so then we could have had it so if the user said "turtle" for instance maybe it would not attack, just defend, or "attack" and then it would send what ever it had to where it knew the enemy to be (if it had found one by that point, otherwise I suppose scout then attack). Other than that team protection types of things would be managed mostly by the Battle Manager and if the AI has spare resources and their team mate does not the Resource Manager could share some.
I do understand that many things that I say would go under one thing or another are actually there since we had not specifically thought of it but I will be continuing to append to the dia file so that when this is all done I can put it up one the wiki. Also thanks for your input.
File comment: This is the updated diagram. SpringAI.7z [10.02 KiB]
Downloaded 4 times
I would but I did not want the ai to cheat, if that is what you where saying, my hope was because the ai can do everything the player can do there should be no things added that a player could. Now if someone actually made this ai I would not complain, it is just why I would not.
I do not believe he was suggesting the AI cheat in the traditional sense, but rather that the player's resource usage be mapped and modeled for the AI to emulate. You would have to do it over a period of time anyway, using abstract categorizations of expenditures to aggregrate the data usefully across factions, so this doesn't necessarily require affording the AI any advantage. It is something the player cannot do, of course.
I think I see what you mean, although if the ai tries to use resources based on what it finds while scouting there are always things that it will not find causing it to inaccurately spend, unless it somehow does not die in scouting and is able to find everything. Correct me if that is not the idea but that is what I got from it.
We'd have to ask him to clarify. I assume it could be done two different ways, either based on scouting or based on some sort of listener which has extended access to the sim. I think a system like that could be viable, if it only accounted for a portion (limited segment, perhaps) of resource usage and built a composite image of behaviour from snapshots, rather than the continnum of play or a single check. It seems like a fun problem.
Perhaps, but I feel that it would also have to be able to tell when the player updates to the moho ones and energy to metal things can be built. I simply think that although it is important to scout, it should not be used to determine how the ai spends resources. Again, it could be great but I feel that our would be more reliable to create a solid resource pattern that it tries to follow and knows how to adapt to different maps that may not have as much metal in reach for instance.
Users browsing this forum: No registered users and 1 guest
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum