Jump to content


Community Members
  • Posts

  • Joined

  • Last visited

Profile Information

  • Gender
  • Location

Fluxkompensator's Achievements


Tiro (1/14)



  1. Hi guys, I'm looking for a way to get the name of the bot or the name of the player (while the game running). Something like "gameState.ai.playerData.name", but this returns the leader of the civilisation I'm playing. If I'm playing against petra, the result should be "Petra Bot". Can anybody help me?
  2. Hello guys In headquarters.js is a function named "buildDefenses". In this function is the line: queues.defenseBuilding.addItem(new m.ConstructionPlan(gameState, "structures/{civ}_defense_tower")); In this way I can tell the AI (_petrabot.js) to build defens towers, but what about walls? Does anyone know a way to do this or have any idea? Thanks for your time and attention.
  3. Thats very uncomfortable: Today I readed my posts again and see that I make a translation mistake: In my description I often using "they" instead of "the AI". (Thats why you asking about how to sharing the knowledge of the AI's. -> Btw. thats a nice idea^^. ) Im very sorry about this Actually I want to speak about only one AI(singual) and not about many AI's(plural). I will give this AI the ability to remember previous games. In this way the AI can make decisions based on his experience. The bot will learn in every game, and changing his strategy if necessary.(The AI will also including some random decisions too) The experience of the AI, I want to write into a simple file on the computer of the user. Because of this I'm looking for a way to let the AI writing files. The Current state is, that I have found a dirty way to do this. (I added funcitons in "/source/simulation2/components/CCmpAIManager.cpp") I'm not happy with this solution, so if anybody have an another idea for me, pls let me know. (My problem: AI can not access "Engine.QueryInterface()") @ fabio: Thanks for the links. I hope all of you have a nice evening and night today.
  4. The idea is that the AI remember the games they played. (The decisions they make and the result of these.) In the next game(s), the AI will make decisions based on their previous experiences. I hope this will creates a kind of "evolvement".To give the AI the ability to remember, I want to write the experiences/decisions into a file. Then the AI can load/read them when a new game (skirmish) starts and save/write them in the end of a game. For example: The AI remeber the last game: The AI only build towers and no army and losed the game. In this game they will try another way (less towers, more army or less towers more workers....)
  5. I'm not sure if I have understood correctly: The AI I want to write, should be for single player games only. (I'm afraid hive mind, multi player sync and thinks like that, are a way over my head.) Just Player VS. "Learning_AI". No multi player, just local skirmish. (later maybe one player and many AI's) The data/file where the bot should write his experience is local. With "The feature to remember past skirmish statistics" I mean the experience of the local bot. (no hive mind) That also means if you use the "Learning_AI" the first time, they will not have any experiences. Do you think there is still a problem with synchronization? @ stanislas69: > Do you plan to do such a thing ? *.* My idea is to write an AI, which has the ability to learn and acts more dynamic. But my programmer skill's (C, C++ and Java) are basic and in JS I'm just at the beginning. The goal is a prototype of the AI. (Not finished and far away from "ready to releasing".)
  6. Thanks a lot for the quick reply! My intention was to advance the AI with several selflearning features. One of these features should be to remember past skirmish statistics. Even after shutdown the system. To do that, I need to write files to the HDD/SSD. As far as i know there is no option to write/edit files for the AI right now. (in general for JS) So I wrote a C++-Component, which can do it. -> But AI can't use the component via "QueryInterface". Do you know an option for the AI to store informations or writing/editing files? Is there any function or something else I can use? (Maybe the vfs.?) Or maybe there is another way to do this?
  7. Hello, I wrote a new component in c++ and now I want to access to this methods in _petrabot.js: Engine.QueryInterface(SYSTEM_ENTITY, IID_MyComponent). In binaries\data\mods\public\simulation\helpers\InitGame.js it works fine. In _petrabot.js you can access to this method: Engine.IncludeModule("common-api") but not to this one: Engine.QueryInterface(SYSTEM_ENTITY, IID_MyComponent): " QueryInterface is not a function" (btw.: SYSTEM_ENTITY and IID_MyComponent are also not defined in _petrabot.js, I have replaced these with the corresponding integer value) It seems to be Engine is defined, but not QueryInterface-function, SYSTEM_ENTITY and IID_MyComponent!? What I am doing wrong? Is there a document where I can see, which functions of "Engine" are accessible in which javascript-files or a general documentation of "Engine"? Maybe I just need a Link. Thank you for your time and attention
  • Create New...