.com.unity Forums
  The Official e-Store of Shrapnel Games

This Month's Specials

Raging Tiger- Save $9.00
World Supremacy- Save $9.00

   







Go Back   .com.unity Forums > Illwinter Game Design > Dominions 3: The Awakening

Reply
 
Thread Tools Display Modes
  #11  
Old December 1st, 2006, 11:45 AM

Hullu Hullu is offline
Corporal
 
Join Date: Nov 2006
Posts: 119
Thanks: 0
Thanked 0 Times in 0 Posts
Hullu is on a distinguished road
Default Re: AI concept of the \'80ies ... why?

Quote:

You have to struggle hard to make it seem computer produces random numbers, for example.

No matter how much you struggly, computer does not generate random numbers (except perhaps with an outside source of randomness, which also most likely is just pseudorandomness

Yea, offtopic, I know, just had to say it!
Reply With Quote
  #12  
Old December 1st, 2006, 01:20 PM

PrinzMegaherz PrinzMegaherz is offline
Sergeant
 
Join Date: Dec 2003
Location: Würzbueg, Germany
Posts: 397
Thanks: 0
Thanked 0 Times in 0 Posts
PrinzMegaherz is on a distinguished road
Default Re: AI concept of the \'80ies ... why?

Quote:
Arralen said:
But there's an easy solution to this:
Atm, the AI programming is still following the concepts of the '80 .. but instead of giving the AI only some seconds to "think" between the player hitting the "end turn" button and him eagerly awaiting the results of his orders, the AI(s) should do its(their) turn(s) while the player does his.

So, what if more than one player is participating in the game? The AI needs all turn files in order to calculate battles. Your idea would work for a" One player VS AI game", but not for multiplayer, which Dominions mainly is about
Reply With Quote
  #13  
Old December 1st, 2006, 01:23 PM
Gandalf Parker's Avatar

Gandalf Parker Gandalf Parker is offline
Shrapnel Fanatic
 
Join Date: Oct 2003
Location: Vacaville, CA, USA
Posts: 13,736
Thanks: 341
Thanked 479 Times in 326 Posts
Gandalf Parker is on a distinguished road
Default Re: AI concept of the \'80ies ... why?

I would love scriptable computer opponents but the handles needed for that have to be written in from the beginning.

And yes, as its been stated, "human" computer players are hard. Artificial Intelligence (AI) is actually easy, but artificially human (AH) is much harder. Its a common subject in the AI newsgroups.

An AI would figure a path from A to B as the strightest and easiest route. AI is simple and gets done often in programming. But always taking the straight line in a game would quickly be abused by human players. To be more human would have to include concepts like flanking, sneaking around behind him, multiple fronts, etc etc.

The closer to AH that programming gets, the more obvious it is that the easy route is just to add more randoms. Now it becomes deciding whether you can get closer to the goal by starting with AI and adding some randoms, or starting with totally random actions and weeding out the most extreme ones.

I do agree that this game could make good use of "thinking" time. As a hosted game it wouldnt bother me if it took hours to think out its moves. As a solo play it might be able to use spare CPU cycles while Im doing my turn but games that do that tend to become games that take over your machine. I dont think Id like that. I like Dom because it lets me keep all my work windows open and skip back-and-forth
__________________
-- DISCLAIMER:
This game is NOT suitable for students, interns, apprentices, or anyone else who is expected to pass tests on a regular basis. Do not think about strategies while operating heavy machinery. Before beginning this game make arrangements for someone to check on you daily. If you find that your game has continued for more than 36 hours straight then you should consult a physician immediately (Do NOT show him the game!)
Reply With Quote
  #14  
Old December 1st, 2006, 01:37 PM
Endoperez's Avatar

Endoperez Endoperez is offline
National Security Advisor
 
Join Date: Sep 2003
Location: Eastern Finland
Posts: 7,110
Thanks: 145
Thanked 153 Times in 101 Posts
Endoperez is on a distinguished road
Default Re: AI concept of the \'80ies ... why?

I was surprised, yesterday, to see AI using Terminus the mercenarey assassin to conquer my weakky-defended provinces. The first one had PD of just 1 or 2, and he killed the Markata and the Bandar Commander pretty easily. In the next battle, one of the markata happened to score 7 damage to him in the very beginning, and he died. Still, I didn't think AI would consider attacking with a lone commander.

It's still far from being able to build thugs or combatants, but not quite as far as I had thought.
Reply With Quote
  #15  
Old December 1st, 2006, 02:13 PM
NTJedi's Avatar

NTJedi NTJedi is offline
General
 
Join Date: Jun 2003
Location: az
Posts: 3,069
Thanks: 41
Thanked 39 Times in 28 Posts
NTJedi is on a distinguished road
Default Re: AI concept of the \'80ies ... why?

Quote:
Gandalf Parker said:
I would love scriptable computer opponents but the handles needed for that have to be written in from the beginning.

Yes scriptable computer opponents would be a great improvement. And with random multiple personalities gamers could examine these personalities as a starting guideline to creating their own AI personality or attempts at improving an existing AI.
__________________
There can be only one.
Reply With Quote
  #16  
Old December 1st, 2006, 04:21 PM
Arralen's Avatar

Arralen Arralen is offline
Major General
 
Join Date: Nov 2000
Location: 500km from Ulm
Posts: 2,279
Thanks: 9
Thanked 18 Times in 12 Posts
Arralen is on a distinguished road
Default Re: AI concept of the \'80ies ... why?

Quote:
PrinzMegaherz said:
So, what if more than one player is participating in the game? The AI needs all turn files in order to calculate battles. Your idea would work for a" One player VS AI game", but not for multiplayer, which Dominions mainly is about
Pardon? Where's the difference between a human and an AI player, if both do their turn at the same time?
Actually, the kind of AI I described is easier to do in Dominions than Civ or Space Empires (but IIRC both have a 'simultanious' mode now, too) - exactly because the AI does not need any player file to do it's turn.

Think you're confusing the game server (who executes the orders and computes the results) or maybe the tactical (battle) AI with the "artifical players", which I'm talking about.

And, Gandalf, if done multi-threaded those AI players wouldn't take away anything from your computers usability, because the AI threads would run with low priority (even Windoze can do that ) and would use only those CPU cycles which are not needed elsewhere.

And if you're concerned that you won't get anything done anymore - just set the calculation time for the AI higher, and it won't have its turn finished before you. And don't forget, there are still the end-of-turn calculations to do, which will take some time, too.
__________________
As for AI the most effective work around to this problem so far is to simply use an American instead, they tend to put up a bit more of a fight than your average Artificial Idiot.
... James McGuigan on rec.games.computer.stars somewhen back in 1998 ...
Reply With Quote
  #17  
Old December 1st, 2006, 05:04 PM
Agrajag's Avatar

Agrajag Agrajag is offline
Lieutenant Colonel
 
Join Date: Jul 2004
Location: Israel
Posts: 1,449
Thanks: 4
Thanked 8 Times in 2 Posts
Agrajag is on a distinguished road
Default Re: AI concept of the \'80ies ... why?

Just wanted to interject and say that currently, the "end of turn calculations" are what takes the majority of time in my turn hosts. The AI "thinking" time is minor and mostly almost unnoticeable.
So atleast in my experience, Gandalf won't need to increase the calculation time just to artificially increase turn hosting time so he could get anything done
__________________
I'm in the IDF. (So any new reply by me is a very rare event.)
Reply With Quote
  #18  
Old December 1st, 2006, 05:30 PM

GwyrgynBlood GwyrgynBlood is offline
Private
 
Join Date: Oct 2006
Posts: 24
Thanks: 0
Thanked 0 Times in 0 Posts
GwyrgynBlood is on a distinguished road
Default Re: AI concept of the \'80ies ... why?

You seem to be of the impression that throwing more time at a problem gets it solved, which it doesn't. Your right that the game could spend free CPU cycles working on the AI, but that's sort of a 'cherry on top' to the main problem, which is actually MAKING the AI.

Making AI is hard to begin with. Making a smart AI for a game that is complicated like this would be even harder. Being able to analyze the map to decide which provinces are good to attack, which are important to defend, where build buildings, where/when to research, what to research, how to budget their money.

Having a dynamic and 'smart' AI would be pretty much impossible with so many variables. The easiest method would be a scripted AI (what most RTS/TBS games use), with which you give it a template to follow and it does so to the best of its abilities. Such a template could contain things like what order to research magic schools in, what percent to budget to defense/buildings/troops, whether to be risky or not, all of those things. The problem with templated AI is that it either ends up being predictable (you KNOW it is going to follow a pattern so you just plan around it), totally unpredictable (meaning it's completely random and therefore, very unhumanlike), or incredibly boring (it always plays the 'best' strategy and always wins. This doesn't really apply to any good strategy game because there shouldn't be any 1 plan that always wins).

Throwing time at a scripted AI is pointless. It makes decisions pretty fast and doesn't need more time. It doesn't think ahead, it just looks at its script and makes the best choices given it.

That's very much different from a 'look ahead' AI (which is what chess AIs use), which basically look at ideal moves, and see what resulting games could happen based off of that move (a branching tree of moves). The idea is to pick a move that has a high degree of success. You can't really do that with Dominions because there are far, far too many variables involved in a turn. Chess is a game with a few pieces with a few limited options. It's easy to look ahead in a game like that. You can't do that in Dominions because there are literally thousands of different potential 'moves' you could make. How do you decide what strategy to test, and then how do you decide what the possible outcome of that was so that you could test the next turn's move? You can't, not only because there are tons of unknown factors involved (such as the outcome of battles) and a ton of decisions to be made, but there are lot of random numbers involved as well. How would a dynamic AI determine what is a good magic school to research? How would it determine how many units to put on Research? How would it decide that it needs more mages to research as opposed to more priests or commanders or elephants?

Assuming you could even answer those questions with a formula, then you have to worry about other players. The AI has to look ahead turns to see what other players are doing. Each player has 1000s of possible turn choices they could make. There can be 16+ players, each who could make any number of choices. There's no way the AI could look at a game with that many possible choices and make a decision as to what to do.

In short, the general problem with dynamic look-ahead AI is that there are too many options for each player to make, and too many different outcomes.

The best possible choice would probably be to run the AI mostly on scripts to give it a general idea how to play its turn. The only dynamic-ness to it would be to have a very abstract view of troop/province power, so it could determine what would be an idea province to defend/attack. Breaking down enemy armies into 'offensive rating', provinces into 'valuable-ness', that kind of thing. Basically, just taking the game and stripping it down to a much, much simpler level so the AI can make some form of plan based on it.


Every aspect of the AI is complicated and a huge headache to program and develop well. The real reason why Dominion's AI is not very good, however, is because it's made by 2 people who are not really conserned with it so much as they are concerned with making a FUN game. Besides that, human players are the real point of a strategy game in the first place. There's not that much reason to focus on something that is largely secondary to the point of the game.
Reply With Quote
  #19  
Old December 1st, 2006, 05:57 PM
Gandalf Parker's Avatar

Gandalf Parker Gandalf Parker is offline
Shrapnel Fanatic
 
Join Date: Oct 2003
Location: Vacaville, CA, USA
Posts: 13,736
Thanks: 341
Thanked 479 Times in 326 Posts
Gandalf Parker is on a distinguished road
Default Re: AI concept of the \'80ies ... why?

Quite true.
The only thing I would point out then is that for THIS game, time should not be a consideration. I know that in many games the AI gets restricted because its "thinking" time is too long. But for this game, that should not be a factor which should release us for some more extensive AI thinking.

But you are right, the programming of that thinking is the rough part.
__________________
-- DISCLAIMER:
This game is NOT suitable for students, interns, apprentices, or anyone else who is expected to pass tests on a regular basis. Do not think about strategies while operating heavy machinery. Before beginning this game make arrangements for someone to check on you daily. If you find that your game has continued for more than 36 hours straight then you should consult a physician immediately (Do NOT show him the game!)
Reply With Quote
  #20  
Old December 1st, 2006, 06:36 PM
Chacal's Avatar

Chacal Chacal is offline
Corporal
 
Join Date: Nov 2006
Location: Toulon - France
Posts: 69
Thanks: 0
Thanked 0 Times in 0 Posts
Chacal is on a distinguished road
Default Re: AI concept of the \'80ies ... why?

Quote:
Hullu said:
Quote:

You have to struggle hard to make it seem computer produces random numbers, for example.

No matter how much you struggly, computer does not generate random numbers (except perhaps with an outside source of randomness, which also most likely is just pseudorandomness

Yea, offtopic, I know, just had to say it!
Radioactive source seem to be a good source of true random
==> http://www.random.org/

Anyway, have anybody here ever seen a good AI in a game (others than chess) ? Personnaly, I see none. Scripts are limited and once understood easly cracked. A true good AI is probably far beyond the focus of a game.
__________________
Chacal
---
Reply With Quote
Reply

Bookmarks


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT -4. The time now is 02:55 PM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©1999 - 2024, Shrapnel Games, Inc. - All Rights Reserved.