Civilization V DLL Source Code coming with Fall Patch

AI is hard.

When the Civ5 modders finally achieve it that will be one more reason not to buy Civ7. ;)

Make the game more realistic, and these robots will be utterly slaughtered by the sheer power of the human mind. As shown very well by the game, artificial "intelligence" has a complete lack of ability to reason and recognize patterns.
 
FiresForever has a way of avoiding the error. Go to the CCtP Maps Tutorial in that forum to find out more.
Yes, thanks, but I've avoided the RealNameEarth method in RED WWII because it would require even more work to make the conversion code for scenario, add one more (big) step for user wanting to make scenario for the mod and was hoping that Firaxis would fix that bug, now if they don't do it in next patch (which will remove the promotion limit, that's a start) I'll think of it again if it's not fixable with the DLL.
 
Make the game more realistic, and these robots will be utterly slaughtered by the sheer power of the human mind. As shown very well by the game, artificial "intelligence" has a complete lack of ability to reason and recognize patterns.
Just give real AI more CPU power and they will crush you mercilessly with the sheer power of their mind. ;)
In some optimization problems over high-dimensional and huge data sets, some evolutionary AI (which civ5 is not) are already able to identify the best patterns on their own, better than humans.
It's just a matter of time.
 
When the source code comes out, will it be possible to make the AI processing time between turns more efficient? I'd love to play a game with 42 City States and not have it grind to a near standstill.
Well, no reason why it wouldn't be possible.
The only things in Civ 5 that are more CPU intensive than in Civ 4 are Hexagons (which barely make a difference) and One-Unit-Per-Tile.
So it can potentially run as-fast or faster than Civ 4.

Just give real AI more CPU power and they will crush you mercilessly with the sheer power of their mind. ;)
In some optimization problems over high-dimensional and huge data sets, some evolutionary AI (which civ5 is not) are already able to identify the best patterns on their own, better than humans.
It's just a matter of time.

Its not a matter of cpu power or technology really.
Civ 5 in its core is a very simply game.
There are are a lot of people capable of writing a Civ 5 AI that completely wrecks all but the best human players with ease. (without lame cheats...)

Its just that:
- There's no money in it
- Its mindless grind-work for the most part (months of mindless grind-work)
- Due the simplicity and limitations of the base game you couldn't even let your bot fight other bots (best start position = auto win)

Of course I'd love to play Civ 5 with a decent AI.
But I'm afraid the concept of making one is too unattractive for it to actually happen.
 
Civ 5 in its core is a very simply game.
Still much more complex than chess with a much wider board.

- Due the simplicity and limitations of the base game you couldn't even let your bot fight other bots (best start position = auto win)
Symmetric maps are very easy to do.
 
There are areas where the AI could be improved substantially without getting into any conceptually difficult territory. In fact, there are whole areas of the game where there really is no AI at all, not even a rough value calculation -- but instead just a random number generator and "flavor" bias. For example: city builds. Sure, there are some situational overrides, but it is mostly just a random number generator and not AI at all. There is no reason why you can't explicitly approximate the value of a library or a market or a monastery or a stable based on the particular city and surrounding plots and current (or projected) population and building cost. That's some serious work, but it isn't conceptually difficult.

Also, there are a number of "strategies" that humans have developed (just look in the Strategies forum) that are, frankly, quite simple and not at all intellectually challenging. For example, "sell all resources". The AI could be adjusted to do this too, or at least to not always be on the wrong side of this deal. This is a case where a simple "fix" could bump the AI by perhaps one whole difficulty level.

Or "scripted" strategies like get techA, techB, techC, then rush with unitX...(triggered by whatever conditionals you want). I've actually added quite a few of these in my Éa mod based on what I think will work. I can change them later or add more (they are entered as simple table rows) as players figure out different effective strategies. Of course, this is very specific to the rule set. But if someone wants to code this for "base Civ5", it could be done and bumps up difficulty again by a level or more.

Tactical AI with 1upt and combined arms seems harder (to me anyway) but that is probably because I don't know much about real AI.
 
Still much more complex than chess with a much wider board.


Symmetric maps are very easy to do.

Civ V is a game with well-defined rules, like chess. So it can be played by an AI. Make the game significantly more unpredictable, where recognition of patterns of gameplay in response to these events becomes critical, and computers cannot adapt.
 
Make the game significantly more unpredictable, where recognition of patterns of gameplay in response to these events becomes critical, and computers cannot adapt.
Why could they not? You fail to realize that in a number of situations, more and more as years passes, computers perform better than humans. Chesses, logistics optimization, faces and writing recognition, driving planes or cars, etc.

Its not a matter of cpu power or technology really.
Civ 5 in its core is a very simply game.
There are are a lot of people capable of writing a Civ 5 AI that completely wrecks all but the best human players with ease. (without lame cheats...)

Its just that:
- There's no money in it
- Its mindless grind-work for the most part (months of mindless grind-work)
- Due the simplicity and limitations of the base game you couldn't even let your bot fight other bots (best start position = auto win)

Of course I'd love to play Civ 5 with a decent AI.
But I'm afraid the concept of making one is too unattractive for it to actually happen.
It is certainly possible to make better than the current AI but:
* I humbly think that you severely overlook the CPU cost and constrains that arise because of the 1upt rule, and how this make the civ5 tactical AI troublesome to implement when compared to the previous versions of the game.
* It's not a monkey job, you need to make really smart choices on many sides in order to avoid a drastic failure.
* There are not that many people who can do it.
* Anyway, the purpose is not to make an AI that can crush any player (which is ifficult). It is to make a performant AND enjoyable AI.
 
Why could they not? You fail to realize that in a number of situations, more and more as years passes, computers perform better than humans. Chesses, logistics optimization, faces and writing recognition, driving planes or cars, etc.


It is certainly possible to make better than the current AI but:
* I humbly think that you severely overlook the CPU cost and constrains that arise because of the 1upt rule, and how this make the civ5 tactical AI troublesome to implement when compared to the previous versions of the game.
* It's not a monkey job, you need to make really smart choices on many sides in order to avoid a drastic failure.
* There are not that many people who can do it.
* Anyway, the purpose is not to make an AI that can crush any player (which is ifficult). It is to make a performant AND enjoyable AI.

It is possible for computers to excel at one particular thing. Say a computer with as much processing power as desired could support an AI which could play 10-dimensional chess (let's say this is equivalent to CiV for the purpose of furthering the discussion). If you had a more realistic situation, where the number of dimensions could vary, the sizes of these dimensions could vary, and these deviations from the norm happened at random, strategies originally created for 10-dimensional chess with 8-long dimensions would be totally useless. That is, until you programmed a new AI for each change in dimension and length, which would require a human programmer... oh wait.... :)

But anyway, the purpose of this thread is not to discuss the potential of artificial intelligence. It is to discuss how the modding scene can be changed by the release of the C++ source code.
 
That is, until you programmed a new AI for each change in dimension and length, which would require a human programmer... oh wait.... :)
Unless you programmed an AI that observes and learn by itself. ;)
Those AI are more CPU-expensive but can provide excellent results, and they are used every day on real problems and perform better than humans because they can identify patterns that their conceptors could not due to the complexity of the data-set and the always-changing nature of the hidden patterns.
 
To streamline my post above:
  • Stop AI from doing things that consistently and predictably hurt it against human players. E.g., the AI always buys all resources offered until broke...so prevent that.
    [work: easy; gain: +1 difficulty level]
  • Add some very simple AI where there currently isn't any. E.g.: the AI should approximate the value of different city build choices; the AI should approximate the value of things bought and sold (to both itself and the trade partner); etc.
    [work: medium; gain: +1 difficulty level]
  • Add functional tactical AI for 1upt and combined arms
    [work: hard; gain: +1-2 difficulty levels]
  • Make a super great AI that can learn
    [work: beyond my comprehension; gain: +? difficulty levels]
I'll just state the goal explicitly: Make the AI more competitive at any given level of handicap bonuses.

All of the discussion here seems to be focused on the really hard stuff. Even if you have a brilliant tactical AI, it won't seem brilliant if the AI is badly gimped by other (likely easier to solve) limitations.
 
* I humbly think that you severely overlook the CPU cost and constrains that arise because of the 1upt rule, and how this make the civ5 tactical AI troublesome to implement when compared to the previous versions of the game.
You may know the game StarCraft II (real-time strategy).
In SC II there are bots capable of controlling huge amounts of units individually.
Single units are constantly being pulled forth and back, the chunk of units even forming an opening for them to pass unobstructed.
And its all done in real-time!

* It's not a monkey job, you need to make really smart choices on many sides in order to avoid a drastic failure.
Oh, I didn't mean to imply that.
I just meant you often know exactly how your code is gonna look.
Only writing it all down and then checking it all thoroughly for possible bugs...
For large games with rather strict and limited rulesets that just isn't too much fun.

* Anyway, the purpose is not to make an AI that can crush any player (which is difficult). It is to make a performant AND enjoyable AI.
Yes, of course.
But you can always limit and randomize a good AI to give the player a fun experience.
A bad/mediocre AI on the other hand you can only "improve" by cheating.
 
Unless you programmed an AI that observes and learn by itself. ;)
Those AI are more CPU-expensive but can provide excellent results, and they are used every day on real problems and perform better than humans because they can identify patterns that their conceptors could not due to the complexity of the data-set and the always-changing nature of the hidden patterns.

Even the most complex AI systems, found in university laboratories, take a painfully long amount of time to recognize that a door is a door. When you move the door, the process starts all over again. When you add a whole roomful of items and ask it to identify the door, the computer will fail entirely due to the new items and entirely new logic is required.

Let's generalize this. If you have a game which is played in 3 spatial dimensions and 1 time dimension (so the human player can visualize it), with 43212 different possible "event dimensions" that can happen, theoretically a single AI program could play the game and may even pass the Turing test. However, if the length of these dimensions changes, the number of these dimensions changes, the length of the dimensions change with respect to each other and some of them randomly, you would require entirely different logic for each situation.
 
You may know the game StarCraft II (real-time strategy).
In SC II there are bots capable of controlling huge amounts of units individually.
Single units are constantly being pulled forth and back, the chunk of units even forming an opening for them to pass unobstructed.
And its all done in real-time!
That's the point: it's done in real time and this is easier. ;)
You can afford to have your units being delayed by a few seconds, the time for the crowd to realize they are blocking each other and then react. But if you do that in civ, you find youself with your units being many turns late.

Another big difference: units in civ5 need to be on the very edge of their targets because most of them have a 1-tile attack radius, which means you have to achieve optimal ordering of units in order to be efficient. And for them to not be damaged too much during the time they're deployed, you need to accurately schedule in advance how they're going to be deployed. Not in RTS: units have a large attack range, it almost does not matter how you order them, whether they are a few seconds late, etc.

Put a RTS-like AI in civ5 and it would be laughable. The civ5 AI looks a lot more complicated to me while a RTS AI does not look impressive. I would even say almost trivial but I learned to be cautious when it come to programming: things may turn harder than you imagine. Besides I didn't play sc2, so I am just talking about RTS in general.

Oh, I didn't mean to imply that.
I just meant you often know exactly how your code is gonna look.
Only writing it all down and then checking it all thoroughly for possible bugs...
For large games with rather strict and limited rulesets that just isn't too much fun.
Ok, we can agree on that, it's true for everything in programming: the fun part is the beginning, when you're imagining everything, learning new problems and issue solutions, etc. At some point you find yourself with everything being answered and you're just typing what's in your mind since weeks. Boring. ;)

Even the most complex AI systems, found in university laboratories, take a painfully long amount of time to recognize that a door is a door. When you move the door, the process starts all over again. When you add a whole roomful of items and ask it to identify the door, the computer will fail entirely due to the new items and entirely new logic is required.
Yes, this is still a dfificult problem for AI while humans are very good at that because they have "built-in circuits for that". Just as the most stupid mammals.

However humans are not that good at finding patterns in complexity. Adding dimensions make them even worst. And this is typically in those problems that AI can produce super-human behaviors.

theoretically a single AI program could play the game and may even pass the Turing test.
Passing the Turing test means to behave as a human. Not being optimal. If you want your AI to pass the Turing test, you need to add non-optimal concepts in them like revenge, stupid mistakes and such.

theoretically a single AI program could play the game and may even pass the Turing test. However, if the length of these dimensions changes, the number of these dimensions changes, the length of the dimensions change with respect to each other and some of them randomly, you would require entirely different logic for each situation.
No, it does not mean you would have to rewrite your AI. Some AI can learn. As long as the general cognitive layers division you set up can fit the problem and it has access to all the inputs, an AI can adapt faster and better then humans. Again we see this everyday in real problems where the number of dimensions is too high for the human brain, and where end-users can add new dimensions (new data sources, formulas and constrains) and let the AI process them and adapt themselves.
 
Don, my point was that it would be too much of a waste to program an AI for every situation in real life. Humans will still be necessary in order to recognize everyday patterns, like the position of a garbage bag and how to pick it up, or how to use a new construction tool. Humans can learn such things intuitively; AI at its core cannot. Plus, the human brain uses only 20 watts of power, while supercomputers may use 20 kilowatts or more.

In the future, work, like manufacturing, analyzing complex data sets, and taking orders at McDonald's, that does not require uniquely human characteristics such as intuitively recognizing any pattern that can reasonably be visualized (a door moved to a position where it has not been moved to before is still a door, a door with clothes and a laptop in front of it is still a door, a door painted blue is still a door, ad infinitum) and creating original work (art, science, religion, etc.) will mean that jobs such as those of artists, engineers, scientists, clergymen, garbage collectors, manufacturing inspectors, and even garbage collectors will remain.
 
Humans can learn such things intuitively; AI at its core cannot.
Why the hell could they not? ;)
Either you consider the human brain like a machine and we can reproduce it, love and intuition included. Either you consider the mind like a supernatural thing and then this discussion is sterile, and we should both quit it and wait 50 years before I send you a little postcard saying "told ya". ;)

Plus, the human brain uses only 20 watts of power, while supercomputers may use 20 kilowatts or more.
We today have powerful CPU that consume a few watts only. And, again, if the nature can do it, we can do it better (well, we will be able to). And provided that mankind continue its course towards scientific progress (which I think is probable but not certain), then we will.

In the future, work, like manufacturing, analyzing complex data sets, and taking orders at McDonald's, that does not require uniquely human characteristics such as intuitively recognizing any pattern that can reasonably be visualized (a door moved to a position where it has not been moved to before is still a door, a door with clothes and a laptop in front of it is still a door, a door painted blue is still a door, ad infinitum) and creating original work (art, science, religion, etc.)
Why should intuition and original creations be humans-exclusive? For the start intuition is only how we label the understanding of things that implicitly arises from causality - a very logical process. Then, regarding original creation, philosophers have much to say about it and most argue that nothing is original. Finally, our very brain is the proof that a neural network can produce those two.

The only human-specific thing is humanity. You can probably fake it in some extent, but if you want a machine to have genuine humanity, it needs to have a human-like brain, a human-like body, a human-like life, etc. In other words, it would need to be a artificial human.

As a result, AI could at the very least be better scientists, better engineers (in the most part, see what's coming), and such. They could also theoretically be great artists or clergymen, but probably only if you would give them something enough human or sensible to them. Which would mean we could no longer see them as machines and would feel compelled to treat them as our equals, while they would themselves claim rights. Not the most desirable outcome imho. And between those two extents is the blurry world of the faked humanity.

So if you really want to imagine some futures along with AI, you need to realize that the only thing that would distinguish us from AI would be humanity. And then the most important is what we would allow: what about AI with sensibility, with humanity, with a survival instinct, with fake versions of those ones, etc? Now here is my own guess: if progress goes on, any salesman will be worth more than any Einstein or Warren Buffet.
 
Why would you need an artificial human when we already can mass-produce them? Robot bodies indirectly controlled by humans in safe pods is enough. Creating artificial humans with emotions and intuition and giving them a full human skill set would serve no purpose at akl. There is no reason at all why beings with human brains and human rights would go into dangerous or tedious situations in lieu of humans. Nobody who opposes slavery can defend this.

As for the mortality factor, humans already last ten times longer than machines of similar complexity, and advances in medicine may extend life tenfold or more. We have no reason at all to make human AI.
 
Why would you need an artificial human when we already can mass-produce them? Robot bodies indirectly controlled by humans in safe pods is enough. Creating artificial humans with emotions and intuition and giving them a full human skill set would serve no purpose at akl. There is no reason at all why beings with human brains and human rights would go into dangerous or tedious situations in lieu of humans. Nobody who opposes slavery can defend this.
Indeed.

As for the mortality factor, humans already last ten times longer than machines of similar complexity, and advances in medicine may extend life tenfold or more.
I seriously doubt that: either we make humans immortal through some cells restoration process, and we destroy ourselves hundred years later on a planet with 50 billions of people, no food and no resources left, or we cannot make humans immortal and euthanasia will become a charity act. Well, you can also imagine scenarios where rich people force 90% of the population to live in hell - sorry, I mean Mars.

We have no reason at all to make human AI.
But we probably do not need sensibility and survival instinct to make AI that are more intelligent and skillful than humans (and probably still have the ability to rationalize humans behavior to understand them and satisfy our human tastes, needs and desires).
 
Indeed.


I seriously doubt that: either we make humans immortal through some cells restoration process, and we destroy ourselves hundred years later on a planet with 50 billions of people, no food and no resources left, or we cannot make humans immortal and euthanasia will become a charity act. Well, you can also imagine scenarios where rich people force 90% of the population to live in hell - sorry, I mean Mars.


But we probably do not need sensibility and survival instinct to make AI that are more intelligent and skillful than humans (and probably still have the ability to rationalize humans behavior to understand them and satisfy our human tastes, needs and desires).

Humans won't be immortal, they would just have extended lifespans as they would die of accident at some point, and rarely they would die of some new disease that would crop up from time to time. Chances are you won't have anyone older than a few thousands of years. As for moving people to Mars, human expansion is necessary for our survival of potentially cataclysmic events as well as to relieve the burden on our own home planet.

Emotions will be necessary for an AI to function in society. There are people who lack a connection between the limbic system (controlling emotion) and the prefrontal cortex (controlling reason) for whom it takes an extremely long time to get anything simple, like going to a doctor's appointment or buying new clothes, done. Everything has the same value for them. Most people, on the other hand, have functioning limbic systems and can therefore make these decisions with extreme ease.

One thing is certain - no matter whatever molecular and quantum computing technologies end up creating human-like AI, they won't be our evolutionary successors or do all the hard work for us because human augmentation is relatively easy with remote-controlled or worn bionic bodies and the robots' wish for the same rights that humans possess. Due to advances in medicine they won't live longer or more pleasurable lives than us. And due to the necessity of their having emotion in order to properly make the countless everyday decisions that characterize life - like choosing the words of this post, which would be darn near impossible to "rationalize" as people without a connection to their limbic system prove - they would not merely be cold but intelligent beings who made most of the major advances in science and engineering, but would feel the same passions and desires as us, and would be driven not only to artistic and religious creativity but also to hatred, anger, and war, the same basic desires that we have to surmount in order to move our civilization forward.
 
Top Bottom