Accueil Crush your enemies... and create an EMPIRE!!! Space Empires V -- BUY NOW!!!

Connexion utilisateur

  • Créer un nouveau compte
  • Demander un nouveau mot de passe

Navigation

  • news
    • archive
    • blogs
    • books
    • forums
    • recent posts
    • groups
  • image galleries
  • projects & downloads
  • search
  • create content
  • agrégateur de nouvelles

Rechercher

Qui est en ligne

Il y a actuellement 4 utilisateurs et 147 invités en ligne.

Utilisateurs en ligne

  • Randallw
  • marhawkman
  • Astorax
  • Jozsf

Languages

  • English English
  • French French

Parcourir les archives

« July 2008  
Mo Tu We Th Fr Sa Su
  1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31      
Accueil » news » forums » Support & Feedback » Scenarios & Mods » SE:V MODs

Balance Mod AI script deciphering questions

Image de inigma
Soumis par inigma le Mer, 2007-11-28 17:44 SE:V MODs

Kwok, I'm doing my best to understand AI development so I can help make AI for BM.

I was curious about this line in AI Global Settings:

The function is function Set_Race_Design_Types

and the line is under the attack ships wanted area:

set num_wanted := Sys_Trunc(lng_Num_Attack_Ships * num_colony_spaces / 500)

How does this calculate the number of attack ships wanted? I see its based on number of facilities, but I am not sure how it computes. Can you give me an example? I guess I am not sure what the value of lng_Num_Attack_Ships is unless its the number of existing attack ships, which doesn't seem to make sense. Maybe my math is wrong, but it appears the result I return by hand is an ever-increasing number. Can you give me two examples of how this formula for wanted attack ships work? Thanks!

inigma

‹ Fleets register as Space_Object_Type_Ship Dark Nova 5.00 into beta testing ›
» Vous devez vous identifier ou créer un compte pour écrire des commentaires

Options d'affichage des commentaires

Sélectionnez la méthode d'affichage des commentaires que vous préférez, puis cliquez sur "Sauvegarder les paramètres" pour activer vos changements.
Mod Designer

Re: Balance Mod AI script deciphering questions

Soumis par Gideon le Mer, 2007-11-28 18:49

I'm not familiar with the exact internal structure of the Balance Mod (I avoid looking at other people's work, so I don't end up unconciously copying them). However, if I were to wager a guess...

lng_Num_Attack_Ships looks like a Global Variable. I would look and see if it is defined in Script_Ai_Global_Variables.txt, and/or in the races' _Main.txt file.

"Only by being constantly at war with evil in all things, including yourself, can you truely know peace."
Download my mod here: GidMod

» Vous devez vous identifier ou créer un compte pour écrire des commentaires
Image de Captain Kwok
Mod Designer

Re: Balance Mod AI script deciphering questions

Soumis par Captain Kwok le Mer, 2007-11-28 19:01

Correct. Most design types have their base demand values calculated this way. The demand values are then typically modified by the state the AI is in.


Space Empires Depot | SE:V Balance Mod

» Vous devez vous identifier ou créer un compte pour écrire des commentaires
Image de inigma

Re: Balance Mod AI script deciphering questions

Soumis par inigma le Mer, 2007-11-28 19:04

I found it. It's a variable defined in the race's main file. The demand formula then is based on a set number of ships per 500 facilities (set by the race's main file). The formula then computes how many ships there should be in existence of that specific type based on the number of facilities (500 seems to be the default for BM). I assume this is based on the idea that the number of total empire facilities somehow figures into how large of a fleet an AI can support.

Interesting, though I am sure it could be modified a bit or even based on some other standard so as to account for current and future maximum resource output... man I could probably really jack up the numbers for some killer fleets... I mean, maybe I am blind but I didn't see anything in the scripts instructing the AI to mothball anything.

I am curious, if I modify anything in the Global AI scripts and (such as to change the function for how many ships of each type is needed) and I recompile my new BM AI, will it be compatible with BM?

I'm looking forward to developing an AI for the first time.

Smiling

Space Empires Wiki

» Vous devez vous identifier ou créer un compte pour écrire des commentaires
Image de inigma

Re: Balance Mod AI script deciphering questions

Soumis par inigma le Mer, 2007-11-28 19:05

see my latest edit - about the mothball statement. Is it true? Does your AI mothball?

And can I edit functions in the global AI scripts and recompile new AI that could compete with yours?

Space Empires Wiki

» Vous devez vous identifier ou créer un compte pour écrire des commentaires
Image de Captain Kwok
Mod Designer

Re: Balance Mod AI script deciphering questions

Soumis par Captain Kwok le Mer, 2007-11-28 19:14

I didn't create any routine for the AI to mothball. I'm not even sure if the supporting function to call the mothball order would work anyway. It doesn't appear to work for calling the cloak/de-cloak order.


Space Empires Depot | SE:V Balance Mod

» Vous devez vous identifier ou créer un compte pour écrire des commentaires
Image de inigma

Re: Balance Mod AI script deciphering questions

Soumis par inigma le Jeu, 2007-11-29 12:33

I'm working on a BM AI that will colonize large, breathable planets in sectors with fewest warp points at max distance first, then working down the list to unbreathable tiny planets close to home. This will hopefully allow them to grab important choke points and consider the colonization value of a system based on low warp point systems with breathables. Backfill then takes place. The next thing I have to figure out is a routine to have the AIs use emergency building to their advantage as they have the ability to micromanage facility, unit, and ship construction more effectively than a human can.

By doing so, the goal is to make an AI that can simply micromanage better than a human and by such sheer effort be able to actually defeat an unprepared human player that must rely on strategy than numbers. It doesn't help though that cloaking and mothball functions in the game don't work currently for the AI. And only if there was a way to order AI planets to launch their fighters to defend warp points...

Anyways, scripting AI is new for me, and I hope to start compiling sometime this week for testing. I may be back here for assistance. Is there a better way though I can contact you Capt Kwok?

Space Empires Wiki

» Vous devez vous identifier ou créer un compte pour écrire des commentaires
Mod Designer

Re: Balance Mod AI script deciphering questions

Soumis par Gideon le Jeu, 2007-11-29 15:50

In my mod, the AI goes for breathable planets first (exept when its resource income is running low, then it switches gears). This is actually one of the easier things to mod.

Open up Script_AI_Lists.txt.

Go to the AI_Generate_Lists function.

Go down to where it says:

  call Sys_Prepare_For_Planet_Sort()
  call Sys_Add_Planet_Sort_Column(SORT_PLANET_BY_ENEMIES_PRESENT_IN_SYSTEM, TRUE)
  call Sys_Add_Planet_Sort_Column(SORT_PLANET_BY_SYSTEM_DISTANCE_TO_HOME_SYSTEM, TRUE)
  call Sys_Add_Planet_Sort_Column(SORT_PLANET_BY_HAS_GRANTED_TECH, FALSE)
  call Sys_Add_Planet_Sort_Column(SORT_PLANET_BY_BREATHABLE, FALSE)
  call Sys_Add_Planet_Sort_Column(SORT_PLANET_BY_PLANET_SIZE, FALSE)
  call Sys_Add_Planet_Sort_Column(SORT_PLANET_BY_TOTAL_PLANET_VALUE, FALSE)
  call Sys_Execute_Planet_Sort(sys_long_Player_ID, lst_AI_Colonizable_Planets)

Change this to:

  call Sys_Prepare_For_Planet_Sort()
  call Sys_Add_Planet_Sort_Column(SORT_PLANET_BY_ENEMIES_PRESENT_IN_SYSTEM, TRUE)
  call Sys_Add_Planet_Sort_Column(SORT_PLANET_BY_HAS_GRANTED_TECH, FALSE)
  call Sys_Add_Planet_Sort_Column(SORT_PLANET_BY_BREATHABLE, FALSE)
  call Sys_Add_Planet_Sort_Column(SORT_PLANET_BY_PLANET_SIZE, FALSE)
  call Sys_Add_Planet_Sort_Column(SORT_PLANET_BY_TOTAL_PLANET_VALUE, FALSE)
  call Sys_Add_Planet_Sort_Column(SORT_PLANET_BY_SYSTEM_DISTANCE_TO_HOME_SYSTEM, TRUE)
  call Sys_Execute_Planet_Sort(sys_long_Player_ID, lst_AI_Colonizable_Planets)

That will move planet distance to lower in the priority list than the presence of special tech, whether it is breathable, its size, and its value.

"Only by being constantly at war with evil in all things, including yourself, can you truely know peace."
Download my mod here: GidMod

» Vous devez vous identifier ou créer un compte pour écrire des commentaires
Image de inigma

Re: Balance Mod AI script deciphering questions

Soumis par inigma le Jeu, 2007-11-29 16:12

Thanks Gideon! That saved me probably a few hours figuring out the best way to start.

Space Empires Wiki

» Vous devez vous identifier ou créer un compte pour écrire des commentaires
Image de inigma

Re: Balance Mod AI script deciphering questions

Soumis par inigma le Lun, 2007-12-03 15:16

Oooh baby...

I had to fuddle with the AI lists script to suit my technique. Took a while to test it but now my BM AI kicks butt. Min/maxed too, it dominates the other AIs by almost double in 30 turns in a med size, low player game. I'm almost afraid to play against it since it knows most of my expansion tricks now, but not quite. I'm trying to figure out how to get it to use emergency queues.

After that, I plan on having it manage its units and early game defense better, but I'll wait until after 1.12 to work on those. Kwok do you know if AI mothballing works yet? I haven't tested it yet.

Space Empires Wiki

» Vous devez vous identifier ou créer un compte pour écrire des commentaires
Image de Captain Kwok
Mod Designer

Re: Balance Mod AI script deciphering questions

Soumis par Captain Kwok le Lun, 2007-12-03 15:24

There is no function to set a queue to emergency build via the scripts.


Space Empires Depot | SE:V Balance Mod

» Vous devez vous identifier ou créer un compte pour écrire des commentaires
Image de inigma

Re: Balance Mod AI script deciphering questions

Soumis par inigma le Lun, 2007-12-03 17:56

Bummers. Any plans by MM to make one?

Is there a list of known game commands/functions that the AI can not execute yet?

Space Empires Wiki

» Vous devez vous identifier ou créer un compte pour écrire des commentaires

Re: Balance Mod AI script deciphering questions

Soumis par Toxic le Lun, 2007-12-10 13:05

So inigma the script that you have as of dec 3. Is that available for download? Smiling would love to have an AI that might try brute force attacks and having to be pure defensive minded against it.

» Vous devez vous identifier ou créer un compte pour écrire des commentaires

Options d'affichage des commentaires

Sélectionnez la méthode d'affichage des commentaires que vous préférez, puis cliquez sur "Sauvegarder les paramètres" pour activer vos changements.

Now on STEAM

Now on STEAM!Space Empires V via STEAMSpace Empires IV via STEAMSTEAM online by Valve Corporation

Contenu populaire

Aujourd'hui :

  • Tweaking the planet art without going all the way to FQM
  • Governmet mod/patch/addon
  • Space Empires V 1.74
  • Research By Percentage SUCKS
  • Shipsets, Empires, and dead AIs

Depuis toujours :

  • Space Empires V and VI: Expansions and the Future: Tell the Company What's on Your Wish List
  • Space Empires V
  • Gritty Galaxy Fleet Clash
  • Damn Dirty Bugs/Annoyances
  • Space Empires V: General Thoughts, Observations, and Suggestions

Dernier accès :

  • Balance Mod- My pilots fail threat assessment...
  • Cloaked explorer ships
  • Any plans to release digital purchase elsewhere?
  • Unable to target Satellites.
  • List of AI Script Files (AKA, Road Map to Madness)...
(c) Strategy First, Inc. All rights reserved.