Warning: Illegal string offset 'type' in [path]/includes/class_postbit.php(294) : eval()'d code on line 65
prototype SK-creating algorithm - .com.unity Forums
.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
  #1  
Old December 30th, 2010, 06:31 PM

Kref Kref is offline
Corporal
 
Join Date: Oct 2009
Location: Moscow
Posts: 86
Thanks: 0
Thanked 6 Times in 2 Posts
Kref is on a distinguished road
Default prototype SK-creating algorithm

Hello!
I've developed a program with prototype algorithm for SK-creating.
It is written with Borland Delphi 7, and use databade technologies (ms access 2003). I think installed BDE (borland database engine (installs automatically with delphi 7 or may be downloaded independently for free)) is required to run this program.

The algorithm searches for all combinations of equipping given chasises with given items, then searches for a spell-sequence that would make combatant satisfy the requirements. It is possible to upgrade the algorithm for searching all spell-sequences for each item combination.

The checking of combatant satisfaction is made in CheckCombatantSatisfactory and RecursSpellSeqStch procedures (they can be inspected even with notepad in ucombatantcreation.pas file). The important things about the checkings - they can be easily modified (and should be, because I didn't spent any time long to think, for example, about how to change 'general attack' or 'general damage' parameters of SK if he has soul vortex and so on); the checking may be replaced with "battles" of planned SK with some forces.

The database is filled with a minimal amount of data, including units, items and spells. That data can be copied from other sources, which I don't currently have.

The program has some currently unused code (I cutted functionality when I saw that I spent more time then I planned).

The algorithm is time-consuming. It can be made more quick, but it would require work, and it still won't work fast.

The algorithm, being modified and upgraded, can be used to make calculations and store data in database on thug creation for each mod, so that AI could create thugs without time-spending during thew game, by the cost of some disk spase. For that, battle-simulation algorithm should be added. How it can work:
- database should store units type and numbers for PD (10 and 20, for example) of each nation of the mod
- all recruitable and summonable commanders of current nation should be taken as possible chasises
- all forgeable items (by recruitable/summonable commanders) should be taken as existing items
- algorithm should automatically calculate possible thugs that can crush PD of different nations
- technology and cost requirements for each thug should be calculated and stored in different cross-tables of mod database.
Then, during runtime, AI would be able to simply look in database for thugs which he can create at cuyrrent research level.
Also, AI that calculate PD-breaking thugs can be extended - for example it can use a part of AI that hires army. By the same methods, it's not hard to imagine an algorithm that would calculate SC's for destroying, for example, 4000 gold and 4000 resourses costed army of each nation (it would need to use an AI algorithms that recruite armies and assign orders to mages, in order to see which army SK should be able to crush).

Well, that work was made to show that advancements in AI are quite possible.
One of the ways to get more sofisticated AI - open savedgame file formats (ftherlnd, .trn, .2h) to community. Then it would be possible to make independent AI programs for making 2h files, then run multiplayer games and then use that programs for computer players.

P.S. I didn't test bdesetup, because I don't know how to uninstull already installed BDE without uninstalling Delphi 7.
Attached Files
File Type: rar dom3dev.rar (647.7 KB, 44 views)
File Type: rar bdesetup.rar (4.69 MB, 44 views)
Reply With Quote
The Following 5 Users Say Thank You to Kref For This Useful Post:
  #2  
Old December 31st, 2010, 01:17 AM
Squirrelloid Squirrelloid is offline
Major General
 
Join Date: Jun 2009
Posts: 2,157
Thanks: 69
Thanked 116 Times in 73 Posts
Squirrelloid is on a distinguished road
Default Re: prototype SK-creating algorithm

By SK you mean SC?
__________________
The ignorant shall fall to the squirrels.
--Chip 4:2

Ulm: Order of the Black Rose - Reimagining MA Ulm

A more Sombre forum: http://z7.invisionfree.com/Dom3mods/index.php?.act=idx. Now with more Maerlande.
Reply With Quote
  #3  
Old December 31st, 2010, 01:29 AM

DeadlyShoe DeadlyShoe is offline
Corporal
 
Join Date: Nov 2010
Posts: 107
Thanks: 4
Thanked 5 Times in 5 Posts
DeadlyShoe is on a distinguished road
Default Re: prototype SK-creating algorithm

That's actually kinda scary. Heh.
Reply With Quote
  #4  
Old January 3rd, 2011, 04:31 PM

Kref Kref is offline
Corporal
 
Join Date: Oct 2009
Location: Moscow
Posts: 86
Thanks: 0
Thanked 6 Times in 2 Posts
Kref is on a distinguished road
Default Re: prototype SK-creating algorithm

Yes, I mean SC.
Reply With Quote
  #5  
Old January 4th, 2011, 01:27 PM

Snoddasmannen Snoddasmannen is offline
Private
 
Join Date: Nov 2007
Posts: 35
Thanks: 7
Thanked 20 Times in 5 Posts
Snoddasmannen is on a distinguished road
Default Re: prototype SK-creating algorithm

This sounds like a really useful piece of software. Potentially it could also be used with a random map generator (maybe mine, in the future ), to generate random indy monsters in some of the provinces to spice up the map a bit. If I understand you right, you could get quite thematical, like:

"Find me the best configuration of this Banelord using const 6 equipment with a total cost of at most 20 death and 10 fire gems"
(maybe you would need to add some more code but I think you get the general idea)

Can you give us with some sample output of your program?
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 08:52 AM.


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