The future of AI

Well that didn't take long:

http://news.sciencemag.org/technolo...ntelligence-bests-humans-classic-arcade-games

Make sure to watch the video.

This is basically what I was inferring would be the next step. A learning process. The reward/goal is simple in this case - score. A game like Civ would obviously be a bit more complicated, but the components are there - there are plenty of metrics for the computer to judge itself by.

Hopefully sooner, rather than later, we'll be complaining about not being able to beat the prince level AI, let alone king and above.
 
Well that didn't take long:

http://news.sciencemag.org/technolo...ntelligence-bests-humans-classic-arcade-games

Make sure to watch the video.

This is basically what I was inferring would be the next step. A learning process. The reward/goal is simple in this case - score. A game like Civ would obviously be a bit more complicated, but the components are there - there are plenty of metrics for the computer to judge itself by.

Hopefully sooner, rather than later, we'll be complaining about not being able to beat the prince level AI, let alone king and above.

yup.. AI is already really smart.
 
Well that didn't take long:

http://news.sciencemag.org/technolo...ntelligence-bests-humans-classic-arcade-games

Make sure to watch the video.

This is basically what I was inferring would be the next step. A learning process. The reward/goal is simple in this case - score. A game like Civ would obviously be a bit more complicated, but the components are there - there are plenty of metrics for the computer to judge itself by.

Hopefully sooner, rather than later, we'll be complaining about not being able to beat the prince level AI, let alone king and above.

You would have to have a very very very long beta version for games like civ 5 .

There is of course one problem in having a computer AI like this. Eventually it would become too good at the game and it would essentially become unplayable. Imagine trying to play pong against a neural AI system? You would cream it to begin with, and then after a few hours it would win absolutely every single game. I don’t much fancy playing something where I get kerb stomped every 5 seconds.
 
What others have said, it took years of fine tuning by a team of brilliant academics to make a Starcraft AI that can beat pros consistently. You will never see that from a dev studio.
 
That's putting it mildly - it's a monumentally much more complex task than what they have accomplished with very simple 2D games.

Gotta start somewhere though. I just wish someone would buy my startup for half a billion dollars lol. Seems kind of ridiculous, the pc barely learns to play pong and the tech is worth half a billion.
 
I think the first we'll see of computers playing games in a Turing-test passing way, instead of via rules-based "AI" is when there are general purpose learning computers. Essentially that would mean they would almost be artificial brains, and the same AI would be capable of learning any game rather than it being something which was specifically shipped with say Civ.

Whether that point will ever be reached, who knows, but I do think most multiplayer games which involve interacting with other players and anticipating/manipulating their actions require that level of sophistication. To play like a human IMO requires a human, or an artificial intelligence which encapsulated enough of being human that it could pass as such in a wider range of situations than just the toybox of a strategy game.

And even then we'd have to specifically program them to play nice! (4th rule of robotics - the robot must not cause the human to have an unenjoyable experience in a game, or through inaction allow that to happen :scan:) As mentioned in an earlier post if you look at how much fun real humans are to play with the answer is often not much fun! Winning at many games can get reduced to how much grind you're prepared to tolerate. And/or how much data on unit stats/rote book moves/lists of valid moves/mechanics internal workings/etc. you're prepared to put in the time learning.

Personally I don't mind the kind of AIs Civ has always had - they make it quite fun. They're rules based but they do have kind of 4th rules built in specifically, like they don't rush on turn 1, backstabbing is limited, etc. I mean what are the AIs there for - to make it fun for us or to beat us? If it's to beat us, see above paragraph.

Unfortunately I think something like Civ 4 may be a high water mark in game custom AIs though, or anyway the fan-modded enhancements are. These days game development is such a commercial enterprise that anything which increases replayability above a certain point is actually a bad thing for the devs. AI which can hang in there and be believable for 10 or 20 games (or the point at which most players would say they'd got their money's worth from the content) is what they'll be aiming for. Which is a shame in the more cerebral genres like strategy but what are you gonna do. Perhaps "better AI" DLCs are the best we might hope for :dunno: Just try making the commercial case for spending dev time on that over a content DLC though - pretty much what warpus said.
 
I think most of the people in this thread are wrong. I think many different events are pointing towards huge leaps in AI in the near future, and I think gaming will benefit greatly from it. Note - gaming will not be the cause of the huge leaps... people won't be doing this research to improve our games, but gaming will benefit nonetheless. Games may even end up being a vehicle to refine the emerging AIs.

And like everything else, it'll go from being one of those things, "oh that's impossible!" to "oh why didn't I think of that..."
 
^ I think it's more likely we'll lower our standards of what constitutes human-like intelligence to meet what computers are capable of doing, and then pat ourselves on the back for building such smart computers and call it job done :rolleyes:

(Was reading Jaron Lanier's book "You Are Not A Gadget" a couple of weeks ago. Well worth a look. He makes a good case that we're making our "selves" into simpler and shallower things by spending more and more of our lives online where the range of available expression and interaction is limited, and degraded, by the tools. Also where we're allowed and encouraged to indulge our natural human weakness of focusing on very narrow interest areas.)
 
The more i think about this post the less i like the idea of a truly organic AI that actually competes with the player. The logical progression of any such intelligence is that it finds the most optimal strategy and then spams it to breaking point. Also, difficulty levels would no longer be fixed. As the computer learns, the goal posts constantly change. It depends on what game you are utilising it with, but ultimately i think it comes down more to good design than it does with AI.
 
Sub-par AI in 4x games always annoyed me.

But if you are unhappy with a situation, what better way to deal with it is there other than actively doing something against it yourself?

That's why I found me a nice indy-4x-game, stepped up to the developers and offered them to improve their AI as a hobby-freetime-activity, while they move on to their next project. After some logistical struggles, they eventually agreed to let me give it a try.

And what can I say? I'm having a blast in doing this. It's been my favorite freetime-activity since then.

I've been doing this for roughly 3 months now and if you compare the before state with what I have accomplished so far, it's really telling how little effort even big companies like Firaxis must be putting into their AI.

When I first started, the "Easy"-difficulty of the stock-AI, which is the highest that doesn't cheat due to bonusses, was hardly able to survive the "natives" and would eventually crumble when "the invasion" occured.
In the test-save for my before-after comparision the last AI was wiped out by the invaders at around turn 250. Till then they barely progressed through the tech-tree since then and their economies where prettymuch stuck because they coulnd't really handle unhappyness and overpopulation. They mostly still ran around with primitive starting units.

How's the situation now? They rapidly develop their economies, know how to handle unhappyness, have sophisticated algorithms to select the right tile-improvements, buildings, technologies and the amount and types of units to build adapted to their current situation.
The "natives" are little more than XP-donators to their units, which they usually don't lose anymore when fighting those.
The invasion, that occurs at a set time, now comes when they are about to enter the final era.
By the time they once all were wiped out, they have dispatched the invasion with little to no crucual losses and are getting close to winning a science-victory.

And yes, of course it is no "real AI" as in a self-learning neural network. It still works by me translating strategical and tactical ideas into algorithms and formulas. But putting some thought in this really can reap results!

It would be nice if my little private-project could have some impact on the future of the industry.

But actually right now I'm extremely discouraged from even playing any other 4x, since it's just frustrating to see how bad the AI is compared to my own and not being able to do anything about it. ^^

That all being said, I'm looking for more people to test and give feedback on my AI-improvements, so I can uncover it's remaining weaknesses and improve it even more.
But unconveniently for potential testers this would involve getting the actual game first. ^^
("Pandora: First Contact" including the Add-on: "Eclipse of Nashira")

I'd expect that a "newbie" player would have a really hard time at competing against the "Easy" AI now.
Without first gaining quite a lot of experience about how to properly play the game.

I, who's experience in playing the game also drastically increased since starting to program the AIs, can't beat the two highest difficulty levels anymore, which with before I hardly had any trouble with.

I'd even suppose that some people would lose against "Very Easy", where the AI actually has a disadvantage.

That's also why some additional and less experienced testers would be good. My main-tester, Zak0r is the best player of the game and till now he always only tested "Very-Hard" (but the last couple of times, much to my sadistic enjoyment, he lost there aswell :) ).

I basically need more feedback in order to readjust the difficulty-levels, which now feel like about 2 or even 3 levels harder than before.

So, if you are interested in helping:
- get the game including it's addon on steam
- rightclick it in your steam-library
- select "properties"
- go to the beta-tab
- select the ongoing beta
- apply my patch-patch from here by following given the instructions there: http://forums.civfanatics.com/showpost.php?p=13737912&postcount=54
- make sure to report your experiences with the game and it's AI in it's thread here or in its steam-forum

Warning: My personal patch-patches only work for the windows-version. Linux- and Mac-users will have to wait till I can get the devs to update the game via steam, which is always a bit of a struggle since they are quite busy with something else. ^^
 
Sub-par AI in 4x games always annoyed me.

But if you are unhappy with a situation, what better way to deal with it is there other than actively doing something against it yourself?

That's why I found me a nice indy-4x-game, stepped up to the developers and offered them to improve their AI as a hobby-freetime-activity, while they move on to their next project. After some logistical struggles, they eventually agreed to let me give it a try.

And what can I say? I'm having a blast in doing this. It's been my favorite freetime-activity since then.

I've been doing this for roughly 3 months now and if you compare the before state with what I have accomplished so far, it's really telling how little effort even big companies like Firaxis must be putting into their AI.

When I first started, the "Easy"-difficulty of the stock-AI, which is the highest that doesn't cheat due to bonusses, was hardly able to survive the "natives" and would eventually crumble when "the invasion" occured.
In the test-save for my before-after comparision the last AI was wiped out by the invaders at around turn 250. Till then they barely progressed through the tech-tree since then and their economies where prettymuch stuck because they coulnd't really handle unhappyness and overpopulation. They mostly still ran around with primitive starting units.

How's the situation now? They rapidly develop their economies, know how to handle unhappyness, have sophisticated algorithms to select the right tile-improvements, buildings, technologies and the amount and types of units to build adapted to their current situation.
The "natives" are little more than XP-donators to their units, which they usually don't lose anymore when fighting those.
The invasion, that occurs at a set time, now comes when they are about to enter the final era.
By the time they once all were wiped out, they have dispatched the invasion with little to no crucual losses and are getting close to winning a science-victory.

And yes, of course it is no "real AI" as in a self-learning neural network. It still works by me translating strategical and tactical ideas into algorithms and formulas. But putting some thought in this really can reap results!

It would be nice if my little private-project could have some impact on the future of the industry.

But actually right now I'm extremely discouraged from even playing any other 4x, since it's just frustrating to see how bad the AI is compared to my own and not being able to do anything about it. ^^

That all being said, I'm looking for more people to test and give feedback on my AI-improvements, so I can uncover it's remaining weaknesses and improve it even more.
But unconveniently for potential testers this would involve getting the actual game first. ^^
("Pandora: First Contact" including the Add-on: "Eclipse of Nashira")

I'd expect that a "newbie" player would have a really hard time at competing against the "Easy" AI now.
Without first gaining quite a lot of experience about how to properly play the game.

I, who's experience in playing the game also drastically increased since starting to program the AIs, can't beat the two highest difficulty levels anymore, which with before I hardly had any trouble with.

I'd even suppose that some people would lose against "Very Easy", where the AI actually has a disadvantage.

That's also why some additional and less experienced testers would be good. My main-tester, Zak0r is the best player of the game and till now he always only tested "Very-Hard" (but the last couple of times, much to my sadistic enjoyment, he lost there aswell :) ).

I basically need more feedback in order to readjust the difficulty-levels, which now feel like about 2 or even 3 levels harder than before.

So, if you are interested in helping:
- get the game including it's addon on steam
- rightclick it in your steam-library
- select "properties"
- go to the beta-tab
- select the ongoing beta
- apply my patch-patch from here by following given the instructions there: http://forums.civfanatics.com/showpost.php?p=13737912&postcount=54
- make sure to report your experiences with the game and it's AI in it's thread here or in its steam-forum

Warning: My personal patch-patches only work for the windows-version. Linux- and Mac-users will have to wait till I can get the devs to update the game via steam, which is always a bit of a struggle since they are quite busy with something else. ^^

So are you the AI programmer for this game? I might take a look. I saw it on the forums ages ago but never really looked into it.
 
It's not super difficult to program a good AI or at the very least a set of scripts in relations to events, its just that it takes a lot of balancing and play-testing to make it feel just right and not cheap or dumb. Studios are allergic to QA nowadays though.
QFT!
I'd say at least 70% of the time I spent on improving the AI actually was testing.
And even then about 30-40% of hints about improvements came from other players and our multiplayer-sessions with the AI and seeing what happened there.

That's why you cannot really "finish" an AI before shipping the game. The most work on it starts when you have it play against actual players. Then there's cycles of feedback => improvements => feedback again.

For example at one point my AI was so extremely aggessive towards "players with lower population" (kind of a cheap way of figuring out the human player on higher difficulty-levels without actually cheating in the sense of actually knowin who is human) that playing it felt like a bad joke. ^^
Everyone spammed troops like there's no tomorrow and just declared war on you outright even if you had a lot of troops. Lower population? => You are the victim!
While that made the AI "good" in a sense that it was hard to beat, it would still totally ruin the game as in feeling cheap or dumb.

That's also why I cannot just work on a patch and not get out inbetween-versions. The feedback is essential to me.

I don't expect it to get a lot better cus there are so many variables in a game as complex as civ and computers can't think abstractly. Despite all the sci fi movies that intimate otherwise I don't expect computers to ever be able to think abstractly either, they will just get quicker and be able to process more variables and situations to come up with more, better objective solutions faster.
In my opinion it is barealy about how fast the computer is but much more about how smart and sophisticated the algorithms were that the programmer implemented.

The closer you get to simulating your own thought-process algorithmically, the better the results.
The algorithm for that doesn't have to be calculation-intense or anything, it just needs to be fed with the players experience translated into a formula or number.

For example:
You have a limited ressource and you have an opportunity to spend it for something.
You know:
Not spending it for anything of course makes the acquisition of the ressource pointless.
Spending it on the first opportunity might be quite a waste when compared to using it at later, potentially much better opportunity.

The only way to really figure out if you should rather spend the ressource now or save it for later is experience.

A pandora-related example is a Black-Hole from a blackhole-generator. A very powerfull operation that has a very long cooldown. If you just tell the AI to find the best target there is now and then use the black-hole on it, it is very likely to be considered a waste and not be available when you need it.

That's why you not only compare the score of potential targets with each other but also with a value from experience from what would be the minimum score, when you would use the black hole. Algorithmically it's just one more comparision. Very cheap on processing time. But you need to implement this experience in order to have the AI make a sophisticated decision of saving the blackhole now and waiting for a better opportunity. Now if you save up more Blackholes, that value can drop. Also driven by an experienced-based algorithm.

You basically have to do something like that on any possible non-trivial decision the AI has to make throughout the game.
Look at what you would do, look at what the AI does and then think about what algorithm is lacking or has to be adjusted in order to have the AI come to the same conclusion as you would.


The other major point is at a certain level of friendliness AIs will never attack you and will always do or not do certain things diplomatically. This is the other major area to exploit them. Share a religion, give a couple gifts and bam, you have an ally for life, despite how easily they could wipe you out. This however I don't think should be changed. They tried making an unpredictable diplomatic AI in the first iteration of civ5 and it failed horribly cus you never knew what they would do. It just doesn't fit the civ game design.
Well, I've been there and like to share my experience with this and how I finally found a way to resolve it in a manner that I feel is good enough.

I had to revise my believes about what would be the best approach several times.

My first opinion was: The AI shouldn't really care about relationship when deciding wheter to make treaties or to declare war. It should just calculate the supposed efficiency and then do whatever the algorithm said. The displayed relationship is just cosmetic-reasons to make the player believe it means something.
Well, the players noticed and found diplomacy to be pointless and frustrating at the same time.

Then I was all about dynamically adjusting AI opinion based on what happens and making decisions based on that. It felt slightly better but was way too predictable.

After a lot of back and forth I now use several weigthed deciding-factors for the most important diplomatic actions. It's kind of like an internal debate:

Our relationship says we should trade with them.
Their economy says we shouldn't trade with them.
The way in which they look like they could be a danger for us if we support them says we should not trade with them.

Similarly for war declaration:

Our relationship says we shouldn't declare war.
The close distance to them says we should declare war.
Our strength-comparision says we should declare war.
Our factions aggressiveness-value says we should not declare war.

The outcome is mostly comprehensible and you feel like you have just enough impact on it but you never feel like you are completely in control of how they would act towards you. There have been quite a few revisions till the weighting of the components felt about right. And as described in the other post: I once had another pro-war-component that just felt completely unfair and thus was removed.

The opponents never respond to what the player is doing, but the player sees what they are doing and can counter in a myriad of ways.

Although I'm not 100% sure I want them too... it might be too difficult! It would be nice if they responded to your types of unit stacks and techs though in war.
Um, even before I layed hand on Pandora-AI they had mechanisms to adapt to military-buildup of others and try and counter their unit composition by adapting their own.
So while I improved how exactly they do it, I was under the impression that other games would do something similar.

Implementing a reaction to someone pulling away in any sort of victory-progress by lowering the relations to him was one of the first things that came to mind as necessity to make the outcome of the game closer. Can't have every AI happily be trading with the guy about to win the science-victory, while they have the military potential to stop him, can you? ^^

And if you would come up with mean tricks like the ones described for Civ4, I'd be happy to teach all of them to the AI as well.
One trick I tought them so far was the "use one orbital-bombard per turn on a sieged city instead of using all at once to prevent healing"-trick.

@sherbz:
I noticed your point very much back when I modded Civ 3.
I threw out a lot of concepts from the game in my mod that the AI simply couldn't handle well enough, like siege-units, corruption and the opportunity to freely pick what tile-improvements to build and voila, without having to worry about these, it dramatically increased the comparative performance of the AI!
However, I don't think that this should be a necessity in game-design.
You want to have hard to use mechanics in your game to challenge the player? Then you have to program AI-routines that handle them well enough.

You want a complex concept like corruption? Then it's your duty to make sure the AI gets a good algorithm to determine the ideal location of it's hidden palace!

I mean: While it is nice to see how the AI get's better the simpler the game gets, it's not really what I consider ideal. I want a complex game and an AI that handles the complexity of the game.

EL might be a good example for that. The majority of it's appeal comes from its complexity. I figure it's a pain in the ass for AI-programmers, but I imagine it to be a lot of fun for them aswell.


You would have to have a very very very long beta version for games like civ 5 .
Why would the improving of the AI necessarily all have to be fit in pre-release? I think with either approach it should be expected to ripe after the release.
While my skill as a player gets better, so does the AI, feels kinda natural.
When I started playing SC2 in multiplayer, I was quite good compared to most others because I had played SC:BW for a long time and partook in the beta.
When I play it now, I'll most likely get owned by those who stuck with it and developed their skills to what, back then was imagined to be the very top of the top. Why would it have to be different in a single-player-game with improving AI?
I mean there's difficulty-levels afterall.

There is of course one problem in having a computer AI like this. Eventually it would become too good at the game and it would essentially become unplayable. Imagine trying to play pong against a neural AI system? You would cream it to begin with, and then after a few hours it would win absolutely every single game. I don’t much fancy playing something where I get kerb stomped every 5 seconds.
Again: That's what difficulty-levels are for. They can't just be used to give the AI bonusses. They could also be used the other way around by artifially limiting the AI's ability or giving bonusses to the player.
That's pretty much how non-competative-chess AIs are these days. It's actually an art-form to not make them play as good as possible but give them playstyles and little weaknesses the player can try and find without making it look dumb.


Personally I don't mind the kind of AIs Civ has always had - they make it quite fun. They're rules based but they do have kind of 4th rules built in specifically, like they don't rush on turn 1, backstabbing is limited, etc. I mean what are the AIs there for - to make it fun for us or to beat us? If it's to beat us, see above paragraph.
Well, um, I... you know... If you are too weak, when you meet my AI it will immediately declare war on you. Just sayin'. Is that too bad?

These days game development is such a commercial enterprise that anything which increases replayability above a certain point is actually a bad thing for the devs.
That is exactly what I thought and what made me feel I need to step in and try and counteract!
I don't care about making money. I care about a game with a good AI. That's why I'll work on that for free. "Normal devs" have to work for profit.
The reality is: Bringing out three games that are just good enough to sell well and amuse people for some time is much better for the industry than trying to make a game as good as possible over years to invest.

Interestingly among the most popular games in the industry are those with alternative business-models and thus are constantly developed on over many years.
League of Legends comes to mind.

It's just continuously improved on and still a lot of fun to play. Unfortunately AI plays a very minor role in that game. I'd love to write LoL-AI to try and compete against top-human teams... Hmmy, maybe I should contact riot-games about an AI-API to do exactly that and have an AI-championship of which the winner is allowed to compete against humans. That would be really, really cool! ^^
 
So are you the AI programmer for this game? I might take a look. I saw it on the forums ages ago but never really looked into it.
Well, as I said. I'm not a member of the original Dev-Team.

I liked the game for its mechanics and how it approached certain things much better and in a more interesting fashion than other similar games.

For example: Shared ressources that allow real specialization of cities, interesting and distinct tile-improvements that are not a no-brainer to pick the most efficient one in any given situation and take some foresight, population-management that actually is pretty interesting, different approach of wide vs. high-expansion-balancing, no game rules that just seem too artificial (like how happyness works in Civ5), semi-randomized-tech-tree for mor diversion.

But as usual in the genre the AI was not very good and what I could accomplish by modding was quite limited too. So I asked if they'd allow me access to the source-code and improve the AI. They did and so I've been doing just that for the past couple' months.

So, yes, I actually would consider myself as "the AI programmer for this game" now.
Not in the sense that I originally designed it's infrastructure and made it.
But in the sense that I'm the one that has and will continue to work on it.

Now that I've reached my first big goal of "having it beat my main-tester Zak0r", I felt confident enough to try and spread the word about it a little more.
 
QFT!
Why would the improving of the AI necessarily all have to be fit in pre-release? I think with either approach it should be expected to ripe after the release.
While my skill as a player gets better, so does the AI, feels kinda natural.
When I started playing SC2 in multiplayer, I was quite good compared to most others because I had played SC:BW for a long time and partook in the beta.
When I play it now, I'll most likely get owned by those who stuck with it and developed their skills to what, back then was imagined to be the very top of the top. Why would it have to be different in a single-player-game with improving AI?
I mean there's difficulty-levels afterall.

Doesn’t this contradict your earlier point about how you need player feedback in order to test an AI? Sadly, most developers do not seem to progress the games AI much at all. Civs AI has been markedly improved over its vanilla iterations, but that work has been done almost exclusively by modders. I have no problem with the AI getting better over time after patching. But I personally would prefer skill levels to be fairly constant according to difficulty level.

QFT]Now that I've reached my first big goal of "having it beat my main-tester Zak0r", I felt confident enough to try and spread the word about it a little more.

Did you have a bet on it? Man i bet Zak0r was pi33ed :lol:
 
Doesn’t this contradict your earlier point about how you need player feedback in order to test an AI?
Why would it contradict it?
What I'm saying basically translates to:
"Release the game in a state with whatever AI you could make till release but then continue development of the AI after the release for as long as possible"
With players playing the game all the time you can gather tons of feedback for improving the AI!

I have no problem with the AI getting better over time after patching. But I personally would prefer skill levels to be fairly constant according to difficulty level.
Could you please elaborate how you mean it?

This leaves quite a lot of room for interpretation:

Do you mean constant as in:

Boni for the AI are constant.
How hard it feels for you is constant.
or
How a new player experiences the difficulty level is constant.

Depending on what you mean, there's very different conclusions to draw. I would suppose the last of the three is what you meant. And I would agree, that this probably is what it should be like. Especially if you have stuff like achievements for beating the game on "very-hard".

The way to accomplish this, is of course to adjust the boni the AI receives. But it certainly involves guesswork.

But then again, if I make "Very Hard" as easy as it was before the AI improvements, there would not be a difficulty that challenges experienced players.
When I was new to the game the Stock-AI on "Very Hard" also owned me. But I got better and eventually beat it. Then, the more I learned about the game, beating it became progressively easier to a point where I didn't feel challenged anymore at all.

Did you have a bet on it? Man i bet Zak0r was pi33ed :lol:
Nope, in this regard he is similar to me. He didn't have any challenge anymore in the game. (He said multiplayer would be his challenge. But this was a lie. He always won there aswell. ;) )
But I suspect that if it goes after him, the highest difficulty should be balanced in a way that he is barely able to beat it if he plays his very best. But this would also imply that noone else can beat it. ^^

So, I guess since we have to redefine difficulty-levels anyways, we can do it for all of them.
 
Top Bottom