 |
|
magnwa
|
|
Has anyone thought of writing an AI and using the play by email option to use the AI in the game? Meaning.. something that will take a save game, decipher it, and play a move?
I s there any way not to have the AI make such stupid moves?
Magnwa
|
|
|  |
 |
|
Kirnwaffen
|
 |
Tryin' hard to chill in the city of Dis
Jul 2000 time: 22:14
|
|
Actually, there has been some very interesting discussion lately about improving the AI. According to two threads (See "The Hardest SP Game..." and "Factions too Agressive") it would seem that the AI plays better when all factions are set to pacifist. In addition, giving the AI an extra former to begin with seems to help, as well as using a pre-terraformed map.
Also, elaborating on the AI programming, designing and programming an AI is a mammoth task, as Basil says, and would require large amounts of time and creativity. Besides that, the game would practically have to be dissected piece by piece to write an AI specific to the game. I myself have done very little beyond very basic programming, however, I do know that a new AI wil not be written unless we come up with a way to split the work between the more technically inclined members of the board.
|
|
|  |
 |
|  |
 |
|
John Paul Jones
|
|
I'm mid-way through writing a civ clone but i havent coded much of the AI yet beyond the pathfinder, map-recognition and some simple scripts for unit movement. One idea i've been toying with (but it's way out of my league right now) is to use some of the algorithms used in chess programs,eg. have the computer look ahead maybe one or two moves. I can imagine this would require a huge amount of processing power- but would improve tactics big time. Now if this could also be applied to the meta-game we'd see a massively improved AI. Any other ideas ?
|
|
|  |
 |
|
Scipio Centaurus
|
|
n-ply look-ahead - even if you could apply sophisticated alpha-beta pruning - would likely not be practical with the number of units and factions that could be in play at any given time. It would also suffer from the search horizon limitation inherent in n-ply look-ahead. "Rats! If I could have set it to look ahead n+1 moves instead of n moves it wouldn't have fallen into your trap."
My guess is heuristic (rule of thumb) programming would be required. In other words codify game specific strategies and write specific software sequences to allow the AI to recognize which heurisitc(s) to employ in a given situation, and then write additional code to allow the AI to organize its resources and implement the strategies.
If you are really ambitious you could code the heuristics inside a neural network to allow the AI to try to learn from its mistakes. AI thinking to itself: "Let's see... I used heuristics 1,2 and 7 to try to take out the Gaians and I got my butt kicked because heuristic 2 only achieved 37% efficiency. I'll try heuristics 1,3 and 7 next time I come up against the Gaians."
This latter strategy is actually employed in some types of advanced R/W applications like medical diagnostic software, weather forecasting and the like.
Try web searches for 'heuristic', 'alpha-beta pruning', 'alpha-beta minimax', 'fuzzy logic', 'neural network' and of course 'artificial intelligence'. You'll get some idea of what would be involved.
- Scipio
|
|
|  |
 |
|
Blake
|
 |
Brainfallocatione
Oct 2000 time: 17:14
|
|
As has already been mentioned it would be almost trivial to improve the AI's economic play with access to the source code (well we can dream on...) what is inexcusable is the AI improved little between SMAC and SMAX, as the excuse of not fully understanding the dynamics of the game is a fairly lame one when SMAC had already been played for a considerable time.
The "ultimate" solution for games is to have the AI in it's own DLL, then release the source code for the AI DLL only, this would allow smart players to tweak the AI, or even create new AI's. The second best option is to have a list of priorities in a .txt file, which would have a list of all facilities, terraforming etc, then the priority under BUILD, EXPLORE, DISCOVER, CONQUER (even better listed under faction leaders too, so different leaders have a different strategy, even under the same settings as another faction). This is not as good as a DLL, because it is limited in it's scope, and special case code is needed anyway (for example if the base has drones, force a rec commons to be built). This special case code is a major PIA for anyone trying to tweak the priorities.
"Learning" AI's are IMO, a bad idea. The NN approach to choose between strategies could work, but utilimately AI's are too stupid to come up with there own strategies, so the best option is to make the AI code easily modifiable by players, so as new killer strategies arise the AI can be modified to use them. Then in a perfect world the game company would actually include the best new AI's in patches.
|
|
|  |
 |
|
Scipio Centaurus
|
|
I would just like to see the AI made smart enough to actually be a credible 'teacher' of the game. To help myself learn I would even be willing to set up scenarios and study the way the computer play against itself. I think there are some existing mods to the rules configuration files that would be suitable for that w/o going to the extremes of writing YAAI (yet another artificial intelligence). Perhaps such a mod could even be used to play incoming PBEM turns as a verifier of a player's strategy. Letting a'puter play your turn should probably be classified as cheating in competition or rated PBEMs though.
|
|
|  |
 |
|
johndmuller
|
 |
Capitol Hill, Colony of DC
Feb 2001 time: 00:14
|
|
Magnwa, I think the basic idea of using the PBEM "hook" for a custom AI is interesting, although one might want as well to link to some independent datafile to provide turn-to-turn continuity and to handle any "additional features" that might reveal themselves. There are people who have decoded at least some of the .sav file structure and while Firaxis would (understandably?) be reluctant to publish their source code for us, they might conceivably reveal the .sav file structure. They might want to keep some of it secret either because they imagine it to be revealing of some private gimmick or because they would be professionally embarassed. Perhaps they could be induced by some promise of code sharing on our part - it would not be an entirely worthless new feature to add to the next version of the Civ family. It is even at least possible that the necessary file specs could remain reasonably unpublished after sharing them with us.
As to whether or not we could (and would) make a better mousetrap out of the AI, that would depend on how much we were to put into it. It is easy to disparage the current AI, but having dabbled in this area, I know how hard it can be to create a program to even get to the "stupid" level, so I wouldn't underestimate the effort necessary to even equal the current AI. The least appealing aspect of this project might be the amount of effort required to build the logic necessary to understand and respect the basic features and rules of the game in general, as well as the particular situation of the current PBEM game file; all of that would be necessary before we could even start dealing with strategy. I would think that vast amounts of gratitude, praise and stroking would be required to recruit the wonderful, extremely talented people needed to take on this task (please consider this to be an adulation down payment). If any(awesome-genius)one(s) were to take it this far, I for one, and I suspect many others would be eager to volunteer work and energy to go the next step.
Once there was a working engine, we would have some strengths to bring to the table, not the least of which would be time, numbers and motivation. Many improvements and well defined development sequences have already been aired in this forum. Everyone knows many AI problem areas and reasonable fixes. If looking ahead were being done, it would presumably be easy to have a user adjustable look-ahead depth, so future situations could be evaluated as far ahead as one's cpu power and patience allowed (assuming we figured out just how to evaluate the positions). It would really be great to have something like this to play with and/or against.
|
|
|  |
All times are GMT. The time now is 05:14. Apolyton Time is 00:14. |
top of page
|
| archivepost |
|
Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is ON
vB code is ON
Smilies are ON
[IMG] code is ON
|
|
|
|
|
|