Matrix Games Forums

Forums  Register  Login  Photo Gallery  Member List  Search  Calendars  FAQ 

My Profile  Inbox  Address Book  My Subscription  My Forums  Log Out

Any news on the A.I.?

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
  Printable Version
All Forums >> [New Releases from Matrix Games] >> World in Flames >> Any news on the A.I.? Page: [1] 2 3   next >   >>
Login
Message << Older Topic   Newer Topic >>
Any news on the A.I.? - 10/5/2006 3:39:29 AM   
Missouri_Rebel


Posts: 3081
Joined: 6/19/2006
From: Southern Missouri
Status: offline
Is there still an ai planned for the initial release? There hasn't been any news concerning it lately but, I'm guessing other aspects of the game need to be in place before we can start talking about it. I just hope that it didn't get scrapped because single player is really wanted by this gamer.

Any a.i.updates that might be worth mentioning?

Mo Reb

_____________________________

**Those who rob Peter to pay Paul can always count on the support of Paul
**A government big enough to give you everything you want is a government big enough to take from you everything you have-Gerald Ford
Post #: 1
RE: Any news on the A.I.? - 10/5/2006 3:57:36 AM   
Neilster


Posts: 3090
Joined: 10/27/2003
From: Hobart, Tasmania, Australia
Status: offline
I'm sure Steve will supply a detailed answer but just to give you a quick response...yes there is going to be an AI. It has lower priority than other tasks and much of the grunt work has been done some time ago. Check out this thread...

http://www.matrixgames.com/forums/tm.asp?m=911968

...and the ones specifically dealing with the AI for each major power, such as this one for the USA...

http://www.matrixgames.com/forums/tm.asp?m=996039

Cheers, Neilster



(in reply to Missouri_Rebel)
Post #: 2
RE: Any news on the A.I.? - 10/5/2006 3:59:46 AM   
Missouri_Rebel


Posts: 3081
Joined: 6/19/2006
From: Southern Missouri
Status: offline
Looks like I have my answer right here in the US DOW on Japan thread;

Posted by Mr. Okeets
- smooth execution for PBEM and over the Internet, and a solid AI opponent-

Is there a name for someone who replies to his own threads? other than pathetic?

mo reb

oops..just saw your post. I assume when you say low priority you mean now and not an overall outlook. One hopes anyways. :)

< Message edited by Missouri_Rebel -- 10/5/2006 4:05:26 AM >

(in reply to Missouri_Rebel)
Post #: 3
RE: Any news on the A.I.? - 10/5/2006 4:16:11 AM   
Neilster


Posts: 3090
Joined: 10/27/2003
From: Hobart, Tasmania, Australia
Status: offline

quote:

ORIGINAL: Missouri_Rebel

Looks like I have my answer right here in the US DOW on Japan thread;

Posted by Mr. Okeets
- smooth execution for PBEM and over the Internet, and a solid AI opponent-

Is there a name for someone who replies to his own threads? other than pathetic?

mo reb

oops..just saw your post. I assume when you say low priority you mean now and not an overall outlook. One hopes anyways. :)


I said "lower priority than other tasks". That means that when those other tasks are completed its priority will increase. Fairly simple really.

Cheers, Neilster

(in reply to Missouri_Rebel)
Post #: 4
RE: Any news on the A.I.? - 10/5/2006 4:31:21 AM   
Shannon V. OKeets

 

Posts: 22020
Joined: 5/19/2005
From: Honolulu, Hawaii
Status: offline

quote:

ORIGINAL: Missouri_Rebel

Is there still an ai planned for the initial release? There hasn't been any news concerning it lately but, I'm guessing other aspects of the game need to be in place before we can start talking about it. I just hope that it didn't get scrapped because single player is really wanted by this gamer.

Any a.i.updates that might be worth mentioning?

Mo Reb

I have been consumed by the need to support Delphi 2006 & Theme Engine, and then the Player interface redesign for the last 3 months. Many items have gathered dust durnig that period. I expect to tackle the AIO again next month. For this month I want to get beta version 3.01 released for testing and the Internet code Dan Hatchen wrote integrated into the main program.

As I have said before, I only really took on this project so I could write the AI Oponent code. The rest of the work is just preparation for doing that.

_____________________________

Steve

Perfection is an elusive goal.

(in reply to Missouri_Rebel)
Post #: 5
RE: Any news on the A.I.? - 10/5/2006 5:03:47 AM   
Missouri_Rebel


Posts: 3081
Joined: 6/19/2006
From: Southern Missouri
Status: offline
sorry neilster that I mis-quoted you.



(in reply to Shannon V. OKeets)
Post #: 6
RE: Any news on the A.I.? - 10/5/2006 5:11:11 AM   
Neilster


Posts: 3090
Joined: 10/27/2003
From: Hobart, Tasmania, Australia
Status: offline

quote:

ORIGINAL: Missouri_Rebel

sorry neilster that I mis-quoted you.


No worries

Cheers, Neilster

(in reply to Missouri_Rebel)
Post #: 7
RE: Any news on the A.I.? - 10/31/2006 8:07:24 PM   
Rexor

 

Posts: 295
Joined: 5/4/2005
From: The Oort Cloud
Status: offline

quote:

ORIGINAL: Shannon V. OKeets


quote:

ORIGINAL: Missouri_Rebel

Is there still an ai planned for the initial release? There hasn't been any news concerning it lately but, I'm guessing other aspects of the game need to be in place before we can start talking about it. I just hope that it didn't get scrapped because single player is really wanted by this gamer.

Any a.i.updates that might be worth mentioning?

Mo Reb

I have been consumed by the need to support Delphi 2006 & Theme Engine, and then the Player interface redesign for the last 3 months. Many items have gathered dust durnig that period. I expect to tackle the AIO again next month. For this month I want to get beta version 3.01 released for testing and the Internet code Dan Hatchen wrote integrated into the main program.

As I have said before, I only really took on this project so I could write the AI Oponent code. The rest of the work is just preparation for doing that.


Which is why you're my hero.

(in reply to Shannon V. OKeets)
Post #: 8
RE: Any news on the A.I.? - 11/1/2006 2:48:38 AM   
Ullern


Posts: 1837
Joined: 5/28/2006
Status: offline
quote:

ORIGINAL: Shannon V. OKeets


quote:

ORIGINAL: Missouri_Rebel

Is there still an ai planned for the initial release? There hasn't been any news concerning it lately but, I'm guessing other aspects of the game need to be in place before we can start talking about it. I just hope that it didn't get scrapped because single player is really wanted by this gamer.

Any a.i.updates that might be worth mentioning?

Mo Reb

I have been consumed by the need to support Delphi 2006 & Theme Engine, and then the Player interface redesign for the last 3 months. Many items have gathered dust durnig that period. I expect to tackle the AIO again next month. For this month I want to get beta version 3.01 released for testing and the Internet code Dan Hatchen wrote integrated into the main program.

As I have said before, I only really took on this project so I could write the AI Oponent code. The rest of the work is just preparation for doing that.


I see! Yes. But my main question then is: will you make the AI such a way that it's possible for others, or yourself to make compeeting AIs?

I'll explain what I mean:
A) you are obviously makeing the AI after you have finished most of the product. The result is that the AI will likely be compiled in seperate modules/objects, that is not really integrated with the other code except that you of course inquire information from all over.
B) Some AI code is obviously going to be the same for all coutries: How to estimate the best possible land attack a country can execute this turn. (maybe influenced by some risk willingness parameter that depends on what country is makeing the evaluation). But other code is likely to be unique for some countries, like how to deploy CPs. This means that if you wanted to you could easily make it possible that a scertain AI task was solved in seperate modules for two countries.

What I am getting at is that with these two above points true it wouldn't be too dificult to give out a description on how to inquire information within MWIF after the release such that others may compile their own AI code later on. And if some other guys proved better you would have the most intresseting task proving you're still master. (What I meant by point B was that maybe it would also be possible to have two different computer AI's in the same game.)

In this way you get us to do a lot off free work for you to be able to create a real awsome AI for the the MWIF 2.0 too. (I am just guessing time constraints makes you do some short cuts in the AI process too.)

Ullern.

(in reply to Shannon V. OKeets)
Post #: 9
RE: Any news on the A.I.? - 11/1/2006 3:39:28 AM   
Shannon V. OKeets

 

Posts: 22020
Joined: 5/19/2005
From: Honolulu, Hawaii
Status: offline
quote:

ORIGINAL: ullern
quote:

ORIGINAL: Shannon V. OKeets
quote:

ORIGINAL: Missouri_Rebel
Is there still an ai planned for the initial release? There hasn't been any news concerning it lately but, I'm guessing other aspects of the game need to be in place before we can start talking about it. I just hope that it didn't get scrapped because single player is really wanted by this gamer.

Any a.i.updates that might be worth mentioning?

Mo Reb

I have been consumed by the need to support Delphi 2006 & Theme Engine, and then the Player interface redesign for the last 3 months. Many items have gathered dust durnig that period. I expect to tackle the AIO again next month. For this month I want to get beta version 3.01 released for testing and the Internet code Dan Hatchen wrote integrated into the main program.

As I have said before, I only really took on this project so I could write the AI Oponent code. The rest of the work is just preparation for doing that.


I see! Yes. But my main question then is: will you make the AI such a way that it's possible for others, or yourself to make compeeting AIs?

I'll explain what I mean:
A) you are obviously makeing the AI after you have finished most of the product. The result is that the AI will likely be compiled in seperate modules/objects, that is not really integrated with the other code except that you of course inquire information from all over.
B) Some AI code is obviously going to be the same for all coutries: How to estimate the best possible land attack a country can execute this turn. (maybe influenced by some risk willingness parameter that depends on what country is makeing the evaluation). But other code is likely to be unique for some countries, like how to deploy CPs. This means that if you wanted to you could easily make it possible that a scertain AI task was solved in seperate modules for two countries.

What I am getting at is that with these two above points true it wouldn't be too dificult to give out a description on how to inquire information within MWIF after the release such that others may compile their own AI code later on. And if some other guys proved better you would have the most intresseting task proving you're still master. (What I meant by point B was that maybe it would also be possible to have two different computer AI's in the same game.)

In this way you get us to do a lot off free work for you to be able to create a real awsome AI for the the MWIF 2.0 too. (I am just guessing time constraints makes you do some short cuts in the AI process too.)

Ullern.

This has been asked in somewhat different forms before. The key question is in what language will the instructions for the AI be written.

If it is in Delphi's Pascal (most likely), then making changes to the instructions would require recoding and recompiling the AI Opponent routines. There would be a lot of design, coding, and testing involved to make them stand-alone code modules, such that others could change them.

Some of the processing will be data driven, obviously, and making the data external (e.g., CSV files) shouldn't be too hard. But that would be a low priority for me, especially documenting how everything worked internally in response to changes in the data files. If it happens as a by-product, then ok. But I am not setting aside time to make that a feature of MWIF product 1.

Right now, I am designing a language for encoding AIO instructions in a rules based format: :"if A is true, then take action B". Actions are not necessarily player decisions. In fact most often they will not be decisions that players make during a game but instead controls for branching logic and calculation of intermediate values. Both of those are highly dependent on the logic driving/driven by the AIO processing.

Many wargame players are familiar with scripts being used for controlling the AIO. I believe structurally those are too fragile a mechanism for designing a good AIO for MWIF.

_____________________________

Steve

Perfection is an elusive goal.

(in reply to Ullern)
Post #: 10
RE: Any news on the A.I.? - 11/1/2006 5:31:51 PM   
SamuraiProgrmmr

 

Posts: 340
Joined: 10/17/2004
From: Paducah, Kentucky
Status: offline
Steve,

I see that you have answered Ullern's remarks and have made it a low priority. I would like to add my comments in the hope that it will raise the priority level a bit. As with everything, whatever you decide will be final. I have been lobbying for many years for games to be released with such abilities and will continue to do so in the future, so don't think I am picking on you.

I would like to take the opportunity to agree that it would be wonderful to be able to write our own AIs. More specifically, it would be great to be able to modify an existing AI.

From a technical standpoint, I think it can be accomplished in such a way as to NOT make very much more work for you IF the paradigm is adopted from the beginning.

Here is my suggestion.

The AI would not be included in the actual EXE of the program but rather be embedded in a DLL. This has several advantages:

  • The AI code is completely encapsulated and therefore changes to the AI will never 'break' the game engine by accident.
  • Multiple AI personalities can be provided if deemed worthy. For example, there could be AIs that are conservative, average, and aggressive. They could have different build strategies. The possibilities are endless. I realize one way to handle this would be with variables that are set at game start but this method does not preclude such a thing.
  • A custom AI could be written by anyone who has any windows development platform that will create a DLL.
  • The custom AI could handle only the things it wanted to do differently and rely on any existing AI by simply passing a call to THAT DLL. The simplest form of this would be to call one set of movement/combat routines and another set of economy/build routines by passing calls to the appropriate existing DLLs.
  • If they are interested, Matrix Games would then be able to advertise this game as having a 'FULLY CUSTOMIZABLE AI'. I think the marketing types will appreciate this.


Every time the game engine needed somethine from the AI, it would call the appropriate function in the DLL.

A way of passing game data to the AI DLL will need to be devised. This information could be passed as a parameter or there could be callback routines which provide the data as needed.

The AI DLLs would only return tokenized instructions for the game engine. It would NEVER actually touch the data. The tokenized instructions would be checked for validity and rejected if invalid.

If you want to to the scripted AI, the same paradigm could be used. The 'scripting engine' could be placed into a DLL that accessed the scripts. If someone wanted to code responses to certain questions, they could write a DLL that handled those and passed the others on.

I don't know what your experience is with DLLs. Some programmers have used them. Most have not. I have had professional experience in writing DLLs in Delphi that interacted with programs written in other languages. If you have any questions that you would like answered before making a final decision, I would be happy to share what I know.

To be honest, I should include the 'downsides' of doing it this way:


  • Data types on cross language platforms are not always defined the same way. A notable example is string handling (Delphi uses a string structure in which the first byte (or more) represent the length of the string. Most other packages use null terminated strings where the data starts immediately and you know you are finished when you get to a special character (null).)
  • There are possibilities for malicious abuse. A DLL could have anything embedded in it. You will need to trust anyone who you get a DLL from. Virus scans may or may not (probably not) be able to catch all of the hooliganism that could ensue.
  • Not everyone would be able to use this feature. However, the WIF types are not representative of the general population. Perhaps a poll of how many have or do not have skills that might find this useful would help.


Most importantly.... However you decide to design the AI, if you encapsulate it now, it leaves room for this feature to be added/exposed in the future. If you don't encapsulate it properly now, it may be too much trouble to ever change later.

Good luck with your efforts.

Dean


_____________________________

Bridge is the best wargame going .. Where else can you find a tournament every weekend?

(in reply to Shannon V. OKeets)
Post #: 11
RE: Any news on the A.I.? - 11/1/2006 6:06:24 PM   
Shannon V. OKeets

 

Posts: 22020
Joined: 5/19/2005
From: Honolulu, Hawaii
Status: offline
Dean,

Thanks. I will consider it. There are many problems though, one of which is I expect the AIO routines to be threaded so they run in the background while the human player is making decisions. That is so the response time from the AIO will be faster because it will have performed as many preparatory analytical routines as possible before it is the AIO's turn to 'move'.

_____________________________

Steve

Perfection is an elusive goal.

(in reply to SamuraiProgrmmr)
Post #: 12
RE: Any news on the A.I.? - 11/1/2006 6:30:25 PM   
SamuraiProgrmmr

 

Posts: 340
Joined: 10/17/2004
From: Paducah, Kentucky
Status: offline
Well, that could make some things interesting when you try to terminate the thread before it is done....

I am at your disposal for research into those technical difficulties.  (Putting my time where my mouth is as it were.)

Thanks for considering.



_____________________________

Bridge is the best wargame going .. Where else can you find a tournament every weekend?

(in reply to Shannon V. OKeets)
Post #: 13
RE: Any news on the A.I.? - 11/1/2006 6:42:31 PM   
Shannon V. OKeets

 

Posts: 22020
Joined: 5/19/2005
From: Honolulu, Hawaii
Status: offline

quote:

ORIGINAL: SamuraiProgrammer

Well, that could make some things interesting when you try to terminate the thread before it is done....

I am at your disposal for research into those technical difficulties. (Putting my time where my mouth is as it were.)
Thanks for considering.





_____________________________

Steve

Perfection is an elusive goal.

(in reply to SamuraiProgrmmr)
Post #: 14
RE: Any news on the A.I.? - 11/1/2006 6:49:42 PM   
jesperpehrson


Posts: 1052
Joined: 7/29/2006
Status: offline
quote:

ORIGINAL: Shannon V. OKeets


quote:

ORIGINAL: SamuraiProgrammer

Well, that could make some things interesting when you try to terminate the thread before it is done....

I am at your disposal for research into those technical difficulties. (Putting my time where my mouth is as it were.)
Thanks for considering.






I feel a faustian deal has been sealed. Lock your house and hide your daughters!

(in reply to Shannon V. OKeets)
Post #: 15
RE: Any news on the A.I.? - 11/1/2006 9:14:13 PM   
Greyshaft


Posts: 2251
Joined: 10/27/2003
From: Sydney, Australia
Status: offline

quote:

ORIGINAL: SamuraiProgrammer
I am at your disposal for research into those technical difficulties. (Putting my time where my mouth is as it were.)

One more innocent passer-by is sucked into the witches brew.

He was never seen again


_____________________________

/Greyshaft

(in reply to SamuraiProgrmmr)
Post #: 16
RE: Any news on the A.I.? - 11/2/2006 2:23:48 AM   
TemKarl


Posts: 37
Joined: 2/21/2006
Status: offline
SamuraiProgrammer,

quote:

The AI would not be included in the actual EXE of the program but rather be embedded in a DLL.


There are several major issues with this approach :

1. Data Access. The AI 'logic' lives in the DLL, but the 'game state' lives in the main exe. If the AI is to make any meaningful decisions, it will need a means to access all "relevent" state information in the exe. That's potentially a lot of information that needs to be exchanged and kept in sync. If you simply grant the DLL 'access' to the raw gamestate, then you open the door to gamestate corruption. If you develop a mechanism for 'marshalling' the data across from the exe to the dll you have to (a) establish and maintain the appropriate number and types of 'marshalled data' and (b) handle syncing issues - making sure that the AI dll is fully using the 'current state', not a mix of current and past state.

2. Data versioning. With a separate AI DLL, we need to ensure that the EXE and DLL remain 'in step' in terms of data format and structure. So if Steve releases "MWiFV1.0.exe" and you immediately write "MySuperAI.dll", then Steve is now unable to change any shared data structures in the exe for the new "MWiF-v1.2.exe" without potentially breaking your logic.

3. Stability is a real issue here - if your AI dll crashes at any time it will take out MWif on it's way down in flames. Imagine you (or someone using your AI DLL) are 2 hours into a game of MWif and it suddenly crashes. What caused it to fail - a long-hidden bug in the main code, or a rogue AI dll? The frustrated player(s) contact Matrix and report a bug. At the very least, there's an ongoing need for some sort of support mechanism that sorts out 'core bugs' from 'AI bugs'. And crashes are just the most visible form of problem here - how about an AI that misbehaves by slowly and gradually sending random air units to the North Pole? Once the player discovers this, is it an AI issue, or a core game issue? How do you tell?

I've built several commercial apps that have offer this "dll plug-in" type of feature to enable end users to customise and/or extend behaviour. Each of the above issues has occurred repeatedly. Each can be managed/solved, but each requires an ongoing commitment of time and energy on the part of the EXE designer. I've spent many hours looking into subtle problems only to find that the error lies in user created code. In short, it isn't "free" to add a user definable AI.

I'd be happy if MWif shipped with such an extensible AI ... but I also fully understand if Steve wants to leave this alone!

* EDITED TO ADD : Almost forgot the biggest up-front time consumer - documenting the gamestate!!! If you're really going to write a solid AI as a dll, you'll need to understand just what the hell all those data structures do. That's not a minor task - describing the data, it's structure, and its 'lifecycle' (when it has meaning, when it doesn't).

< Message edited by cwie -- 11/2/2006 5:49:33 AM >

(in reply to SamuraiProgrmmr)
Post #: 17
RE: Any news on the A.I.? - 11/2/2006 3:04:17 AM   
YohanTM2

 

Posts: 1141
Joined: 10/7/2002
From: Toronto
Status: offline
Head spinning...feel ill...note to self, never read this thread again

(in reply to TemKarl)
Post #: 18
RE: Any news on the A.I.? - 11/2/2006 3:58:31 AM   
wworld7


Posts: 1727
Joined: 2/25/2003
From: The Nutmeg State
Status: offline
cwie,

Please spend less time over here and more time working on CWIE2.

I have interest in the both MWIF and CWIE2 projects.

I have a friend who has an XP machine and will not play anything but CWIE.

Flipper






(in reply to TemKarl)
Post #: 19
RE: Any news on the A.I.? - 11/2/2006 5:43:58 AM   
TemKarl


Posts: 37
Joined: 2/21/2006
Status: offline
quote:

ORIGINAL: flipperwasirish

cwie,

Please spend less time over here and more time working on CWIE2.

I have interest in the both MWIF and CWIE2 projects.

I have a friend who has an XP machine and will not play anything but CWIE.

Flipper


If I had more time to spend, it would be spent on CWiE2! Just need 27 hours a day and we'd be fine.

But I need my MWif fix as well, so I drop by to stay in touch. Was a beta tester in the Chris Mariacci days, and MWiF is top of my list of purchases in 2007.


(in reply to wworld7)
Post #: 20
RE: Any news on the A.I.? - 11/2/2006 6:03:16 AM   
Shannon V. OKeets

 

Posts: 22020
Joined: 5/19/2005
From: Honolulu, Hawaii
Status: offline
quote:

ORIGINAL: flipperwasirish
cwie,

Please spend less time over here and more time working on CWIE2.

I have interest in the both MWIF and CWIE2 projects.

I have a friend who has an XP machine and will not play anything but CWIE.

Flipper


It's simply unproductive to focus on one thing continually. Your eyes get crossed.

And cross pollination of ideas between developers yields better results for everyone.

_____________________________

Steve

Perfection is an elusive goal.

(in reply to wworld7)
Post #: 21
RE: Any news on the A.I.? - 11/2/2006 8:38:32 AM   
wworld7


Posts: 1727
Joined: 2/25/2003
From: The Nutmeg State
Status: offline

quote:

ORIGINAL: cwie

quote:

ORIGINAL: flipperwasirish

cwie,

Please spend less time over here and more time working on CWIE2.

I have interest in the both MWIF and CWIE2 projects.

I have a friend who has an XP machine and will not play anything but CWIE.

Flipper

quote:

ORIGINAL: cwie

If I had more time to spend, it would be spent on CWiE2! Just need 27 hours a day and we'd be fine.

Stop eating and sleeping and maybe you could it (drink, program CWIE2 and pollinate MWIF).


But I need my MWif fix as well, so I drop by to stay in touch. Was a beta tester in the Chris Mariacci days, and MWiF is top of my list of purchases in 2007.

quote:

ORIGINAL: Shannon V. OKeets

It's simply unproductive to focus on one thing continually. Your eyes get crossed.

And cross pollination of ideas between developers yields better results for everyone.



I can't argue against such solid logic. I intend to purchase both in 2007 if they make it out the door. But come 2008 the game of choice will be the....drum roll... the Vista version of Donkey Kong

(in reply to TemKarl)
Post #: 22
RE: Any news on the A.I.? - 11/2/2006 5:27:39 PM   
SamuraiProgrmmr

 

Posts: 340
Joined: 10/17/2004
From: Paducah, Kentucky
Status: offline
Before I start, I would like to say something.

Any time a debate like this is carried on in writing, there is the chance that something will be taken wrong and a flame war will ensue. Please accept that I am debating the issue and have no intention of sarcasm, slamming, disrespecting or any other socially negative actions. If anything I write here is taken that way, it is taken in a spirit different from what is intended.

quote:

ORIGINAL: cwie

There are several major issues with this approach :

1. Data Access. The AI 'logic' lives in the DLL, but the 'game state' lives in the main exe. If the AI is to make any meaningful decisions, it will need a means to access all "relevent" state information in the exe. That's potentially a lot of information that needs to be exchanged and kept in sync. If you simply grant the DLL 'access' to the raw gamestate, then you open the door to gamestate corruption. If you develop a mechanism for 'marshalling' the data across from the exe to the dll you have to (a) establish and maintain the appropriate number and types of 'marshalled data' and (b) handle syncing issues - making sure that the AI dll is fully using the 'current state', not a mix of current and past state.



Yes, the game state lives in the main exe. Yes, the DLL may not have unlimited access to the game state to prevent cheating. Yes, there must be a path for the data to get to the DLL. No, there are not any problems with syncing issues.

Even though the DLL does exist separately from the EXE before the program is run, it will be part of the EXE when it runs. DLL stands for Dynamic Link Library. Technically speaking, Linking occurs as the last step of compiling. The machine code that has been generated from the source code is linked together so that every place there is a call to a method (think subroutine) is finally given an address to the method. The concept of DLLs simply delays the linking process until the program is run. So the DLL is effectively part of the main program at executiion time.

This makes the sharing of data much easier. No DDE (dynamic data exchange) must occur between multiple programs that are running. Steve mentioned that he wanted to 'thread' the AIO. That does not, in and of itself, create another executing program. It is still part of the same program.

As for data exchange, it would appear that there would be some inefficiencies in passing the data. What is more likely closer to the truth is that Steve would be calling methods to get the data he wants anyway. Grabbing a piece of data is not always a simple process. I often write functions that 'fetch' the piece of data I want while processing. I call them with parameters that identify what I need at the moment and the functions give it to me. Exposing those calls to the DLL should not cause a great amount of extra processing time.

To prevent the DLL from altering the game state data directly is very simple. When called, the DLL will be passed the address of either a TObject or a function. This TObject or function will ONLY return data and will NEVER change data. As I stated before, the 'orders' that the DLL gives will need to be passed to the game engine in a tokenized form so it can check them for validity before implementing them. This is the only place where non-insignificant processing will be added if this method is adopted. I still don't think it will be that bad.

quote:

ORIGINAL: cwie

2. Data versioning. With a separate AI DLL, we need to ensure that the EXE and DLL remain 'in step' in terms of data format and structure. So if Steve releases "MWiFV1.0.exe" and you immediately write "MySuperAI.dll", then Steve is now unable to change any shared data structures in the exe for the new "MWiF-v1.2.exe" without potentially breaking your logic.



Yes, of course. I think this is insigificant. Do you know of any games that haven't broken save games at sometime when a patch was released? If Steve patches the program, he will patch his AIs if necessary no matter what paradigm he adopts for the AIO.

This is not a problem because use of 'customized' AIOs will be optional anyway. If there are enough changes during a patch to create these problems, the save game will likely be broken anyway so you simply start a new game with the stock AIOs.

quote:

ORIGINAL: cwie

3. Stability is a real issue here - if your AI dll crashes at any time it will take out MWif on it's way down in flames. Imagine you (or someone using your AI DLL) are 2 hours into a game of MWif and it suddenly crashes. What caused it to fail - a long-hidden bug in the main code, or a rogue AI dll? The frustrated player(s) contact Matrix and report a bug.



I think that it will be fairly obvious if a problem only occurs when a non-stock AIO is being used that it is a problem with the non-stock AIO. The gaming industry is filled with mods that 'break' games. There is no reason to believe that this will be any different. Space Empires IV had the opportunity for custom AIs. Some were good and some were bad. The community had opinions on which was which and people actually used them. I will address another point about this in my next post.

quote:

ORIGINAL: cwie


At the very least, there's an ongoing need for some sort of support mechanism that sorts out 'core bugs' from 'AI bugs'. And crashes are just the most visible form of problem here - how about an AI that misbehaves by slowly and gradually sending random air units to the North Pole? Once the player discovers this, is it an AI issue, or a core game issue? How do you tell?



The stock AIOs will be no more stable or unstable because they are in a DLL. It will likely be the same code either way.

I seriously doubt that anyone (even myself) would actually build an AIO from the ground up. More likely, they will tweak the functions they are interested in and simply pass the rest of the function calls over to a stock AI.

quote:

ORIGINAL: cwie


I've built several commercial apps that have offer this "dll plug-in" type of feature to enable end users to customise and/or extend behaviour. Each of the above issues has occurred repeatedly. Each can be managed/solved, but each requires an ongoing commitment of time and energy on the part of the EXE designer. I've spent many hours looking into subtle problems only to find that the error lies in user created code. In short, it isn't "free" to add a user definable AI.



I disagree with this. When the DLL is a required part of the total package, yes it is a problem. When the DLL is an optional replacement for an existing DLL, no it is not. If someone can't get their DLL to work, they should not release it. Furthermore, the community should not use it.

quote:

ORIGINAL: cwie

I'd be happy if MWif shipped with such an extensible AI ... but I also fully understand if Steve wants to leave this alone!



So would I



To be sure, I doubt this will be part of the first version. But, as I pointed out earlier, if things are structured correctly now, it will leave room for such an expansion. If not, it will likely never happen.

quote:

ORIGINAL: cwie

* EDITED TO ADD : Almost forgot the biggest up-front time consumer - documenting the gamestate!!! If you're really going to write a solid AI as a dll, you'll need to understand just what the hell all those data structures do. That's not a minor task - describing the data, it's structure, and its 'lifecycle' (when it has meaning, when it doesn't).


Yes, there is some truth to that. In the old days, we were limited to 8 characters for variable and method names. Today, however, the names can be very long (and descriptive) and the development tools have useful functionality built into them to keep long names from being a hassle while writing code. Good choices in descriptive names will minimize the impact of that problem.

Also, the 'game state' should always have meaning. The question is really whether the AIO is interested in that state to make its decision.

CWIE, I am genuinely interested in your rebuttal.

Dean

_____________________________

Bridge is the best wargame going .. Where else can you find a tournament every weekend?

(in reply to TemKarl)
Post #: 23
RE: Any news on the A.I.? - 11/2/2006 5:46:53 PM   
SamuraiProgrmmr

 

Posts: 340
Joined: 10/17/2004
From: Paducah, Kentucky
Status: offline
Some of you may be asking WHY?  Why does he care?  Why does it matter?

Good Question!

Here is (I hope) a good answer.

WIF takes a very long time to play.  In my limited experience, (as in bridge), being brilliant is not nearly as important as not making mistakes.  Every game of WIF I have ever played was decided when someone made a terrible error and thier opponent capitalized on it. 

In my previous post, I mentioned Space Empires IV.  This was a game that took a very long time to play.  We would spend literally months on PBEM games.  When they were over, the were generally decided by one of three major factors:
  1. Diplomatic Treachery (It's part of the game).
  2. Inequitable starting situations giving some players a disadvantage that they can never overcome.
  3. Choices made before the game started that could not be changed during the game.

#2 and #3 are the points I would like to key on.  Many games were foregone conclusions because of #2 and #3.  No one knew for sure what that conclusion was until the game played out.  Nonetheless, choices made in the pregame customization of your race and the random encounters of NPC races early in the game usually (in my experience) determined the winner.

So, we would play for months to find out what was determined in the the first week (or even the first 30 minutes of play)!

SEIV had a player community that tinkered with customized AIs.  That was nice because the AI was not always that challenging.  Some of the community provided ones were pretty ruthless.  All of them had their problems, though.

One of the neat things that happened in that community was that occasionaly, someone would run a 'tournament' pitting player provided AIs against each other.  So instead of taking 3 to 5 years, in 3 to 5 weeks, a good tournament could be run and the AI writers could go 'back to the drawing board'.

In this case, they had all of the fun of playing the game (except human diplomacy) without the drudgery (I know of people that took 4 hours to do a turn late in a game).

This is what I am hoping for.  This is why.  I would like to be able to pit my skills as a WIFfer and as a programmer against others. Life is such that I don't have time to play.  I want to be able to 'experience' playing the game - i.e.  Figure out which strategies work and which ones don't --- get feedback on my ideas --- challenge some of the best! 

However, I know I won't have the time to devote to it.  And I don't want 3 months of play time to be wasted because I forgot to garrison Alaska. (Don't ask - it actually happened ). 

Oh well,  I have rambled enough.

Thanks for reading.

_____________________________

Bridge is the best wargame going .. Where else can you find a tournament every weekend?

(in reply to SamuraiProgrmmr)
Post #: 24
RE: Any news on the A.I.? - 11/2/2006 6:58:32 PM   
Froonp


Posts: 7995
Joined: 10/21/2003
From: Marseilles, France
Status: offline
quote:

Some of you may be asking WHY? Why does he care? Why does it matter?

I am happy you care, and I don't need to know why

(in reply to SamuraiProgrmmr)
Post #: 25
RE: Any news on the A.I.? - 11/2/2006 7:38:35 PM   
Shannon V. OKeets

 

Posts: 22020
Joined: 5/19/2005
From: Honolulu, Hawaii
Status: offline
Dean,

I like your ideas. When I redesign the game engine (probably in December) to support NetPlay, PBEM, and the AIO, I'll keep all this in mind. Still, documenting (so an outsider can understand and modify) the 5 or 6 hundred processes that will be used to drive the AIO decision making won't be part of MWIF product 1. That extra delay would be unfair to many people.

_____________________________

Steve

Perfection is an elusive goal.

(in reply to SamuraiProgrmmr)
Post #: 26
RE: Any news on the A.I.? - 11/2/2006 9:14:41 PM   
SamuraiProgrmmr

 

Posts: 340
Joined: 10/17/2004
From: Paducah, Kentucky
Status: offline
Steve,

In the SEIV game I was speaking of, there was basically ZERO documentation... Just the CSV files with the existing scripts and have at it!

Assuming you go with the DLL idea....

The only documentation that would be absolutely necessary would be to publish the interface section of the DLL . If the procedure and function calls are named informatively, the rest should be fairly straightforward.

In case it matters, I would volunteer to help document those if you would be willing to answer questions occasionally and point out errors in the documents.




_____________________________

Bridge is the best wargame going .. Where else can you find a tournament every weekend?

(in reply to Shannon V. OKeets)
Post #: 27
RE: Any news on the A.I.? - 11/2/2006 9:31:02 PM   
Shannon V. OKeets

 

Posts: 22020
Joined: 5/19/2005
From: Honolulu, Hawaii
Status: offline

quote:

ORIGINAL: SamuraiProgrammer

Steve,

In the SEIV game I was speaking of, there was basically ZERO documentation... Just the CSV files with the existing scripts and have at it!

Assuming you go with the DLL idea....

The only documentation that would be absolutely necessary would be to publish the interface section of the DLL . If the procedure and function calls are named informatively, the rest should be fairly straightforward.

In case it matters, I would volunteer to help document those if you would be willing to answer questions occasionally and point out errors in the documents.




WARNING: I will not forget your offer.

_____________________________

Steve

Perfection is an elusive goal.

(in reply to SamuraiProgrmmr)
Post #: 28
RE: Any news on the A.I.? - 11/2/2006 9:49:04 PM   
SamuraiProgrmmr

 

Posts: 340
Joined: 10/17/2004
From: Paducah, Kentucky
Status: offline


By the way....

My name is Rufus T. Bumpkin.

I can be found at:

4200 E Sunken Drive
East East Miami, East Florida BR549



Seriously,

I am here when you need me.

Dean

_____________________________

Bridge is the best wargame going .. Where else can you find a tournament every weekend?

(in reply to Shannon V. OKeets)
Post #: 29
RE: Any news on the A.I.? - 11/2/2006 10:28:02 PM   
Zorachus99


Posts: 1054
Joined: 9/15/2000
From: Palo Alto, CA
Status: offline

quote:

ORIGINAL: SamuraiProgrammer
However, I know I won't have the time to devote to it.  And I don't want 3 months of play time to be wasted because I forgot to garrison Alaska. (Don't ask - it actually happened ). 


I NEED TO KNOW :) How did it occur, ramifications, and could the Japanese really do something with that? The bad old days of off-board boxes?

Sounds vewwy interesting!

Perhaps we need a WIF thread to share about WIF games of yore.

_____________________________

Most men can survive adversity, the true test of a man's character is power. -Abraham Lincoln

(in reply to SamuraiProgrmmr)
Post #: 30
Page:   [1] 2 3   next >   >>
All Forums >> [New Releases from Matrix Games] >> World in Flames >> Any news on the A.I.? Page: [1] 2 3   next >   >>
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts


Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI

0.219