<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[AI never buys resources?]]></title><description><![CDATA[<p dir="auto">Re: <a href="/topic/74/dragon-war-official-thread">Dragon War - Official Thread</a></p>
<p dir="auto">Hi,</p>
<p dir="auto">I've  played Dragon War for many hours, it's very nicely done game! However, because I want to make my own game, I wanted to see what I could improve in existing games, so..I've chosen Dragon War for the start (and for myself only). I added food consuming and food production as an addition to existing units (for ex.: units produce -1 Food or -1 PUs and Towns are producing some resources).</p>
<p dir="auto">Game worked very well for me, but AI wasn't interested in resources at all. So, I returned to the original game and checked it on Hard AI... AI is not interested at all in buying food, metal od wood... Also, AI doesn't bother buying any upgrades (I understand that AI isn't with upgrades yet) or resource producing units... AI NEVER buys any resources and usually after dozens of turns AI gamers ends with thousands of unused PUs.</p>
<p dir="auto">Do you have any idea how to force AI to consider (even with some "tricks") buying resources or units/buildings producing resources? I've heard that AI is considering purchases based on att/def stats and places on the map, also "IsInfra" apparently is a thing?</p>
<p dir="auto">Any ideas?</p>
<p dir="auto">Thank you for the fantastic game and Have a Nice Day!<br />
ComR</p>
]]></description><link>https://forums.triplea-game.org/topic/928/ai-never-buys-resources</link><generator>RSS for Node</generator><lastBuildDate>Wed, 11 Nov 2026 12:38:06 GMT</lastBuildDate><atom:link href="https://forums.triplea-game.org/topic/928.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 07 Jul 2018 10:30:06 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to AI never buys resources? on Sat, 07 Jul 2018 18:56:03 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/comr" aria-label="Profile: comr">@<bdi>comr</bdi></a> Best thing is to play some of the new/complex maps and read the POS2 XML to understand what is available today: <a href="https://github.com/triplea-maps/the_pact_of_steel/blob/master/map/games/pact_of_steel_2.xml" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/triplea-maps/the_pact_of_steel/blob/master/map/games/pact_of_steel_2.xml</a></p>
<p dir="auto">The AI overview and backlog of improvements are here: <a href="https://forums.triplea-game.org/topic/105/ai-development-discussion-and-feedback">https://forums.triplea-game.org/topic/105/ai-development-discussion-and-feedback</a>. I wrote all of the Fast/Hard AI so know all of the algorithms/code for it. It was primarily written to play the standard A&amp;A maps (classic, revised, v3, global, etc) so it performs reasonably well on maps that primarily use similar rules. But if you try to have the AI play Total World War or Civil War, it plays very poorly and doesn't understand many of the features used in those games. Suggestions and contributions are always welcome and you can find the AI code here: <a href="https://github.com/triplea-game/triplea/tree/master/game-core/src/main/java/games/strategy/triplea/ai" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/triplea-game/triplea/tree/master/game-core/src/main/java/games/strategy/triplea/ai</a></p>
]]></description><link>https://forums.triplea-game.org/post/14060</link><guid isPermaLink="true">https://forums.triplea-game.org/post/14060</guid><dc:creator><![CDATA[redrum]]></dc:creator><pubDate>Sat, 07 Jul 2018 18:56:03 GMT</pubDate></item><item><title><![CDATA[Reply to AI never buys resources? on Sat, 07 Jul 2018 18:47:23 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/redrum" aria-label="Profile: redrum">@<bdi>redrum</bdi></a> Thank you, I saw these, but it's looong list and it's new every few days for now - good, it seem alive! <img src="https://forums.triplea-game.org/assets/plugins/nodebb-plugin-emoji/emoji/android/1f609.png?v=fbe62970dd5" class="not-responsive emoji emoji-android emoji--wink" style="height:1.4em;width:auto;vertical-align:middle" title=";)" alt="😉" /> But, I missed a lot in the middle - this is my problem. Regarding AI, I have few simple ideas, I wrote it, but... deleted it all before posting, because I do not know how AI work exactly, so I would like to read source code (or pseudo code - if algorithms are written that way?). I have some simple ideas, but I'm not sure if it would be so simple to implement.</p>
]]></description><link>https://forums.triplea-game.org/post/14059</link><guid isPermaLink="true">https://forums.triplea-game.org/post/14059</guid><dc:creator><![CDATA[ComR]]></dc:creator><pubDate>Sat, 07 Jul 2018 18:47:23 GMT</pubDate></item><item><title><![CDATA[Reply to AI never buys resources? on Sat, 07 Jul 2018 18:42:40 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/comr" aria-label="Profile: comr">@<bdi>comr</bdi></a> Well the original developers have moved on but there are about 4 of us developers that are making changes to the engine. Here is a list of things that have been added/improved recently: <a href="https://forums.triplea-game.org/topic/182/guidelines-and-feature-request-list">https://forums.triplea-game.org/topic/182/guidelines-and-feature-request-list</a>. You can also view all the changes in the github repo PRs/commits: <a href="https://github.com/triplea-game/triplea" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/triplea-game/triplea</a></p>
<p dir="auto">The AI will always try to spend all of its PUs if there are available units to buy. If those units require other resources and it can't afford them then currently there isn't anything it can do. You'd need to provide some unit that it will buy that then generates other resources or is triggered for resources or provide some weaker PU-only units that the AI can spend extra PUs it has on.</p>
]]></description><link>https://forums.triplea-game.org/post/14057</link><guid isPermaLink="true">https://forums.triplea-game.org/post/14057</guid><dc:creator><![CDATA[redrum]]></dc:creator><pubDate>Sat, 07 Jul 2018 18:42:40 GMT</pubDate></item><item><title><![CDATA[Reply to AI never buys resources? on Sat, 07 Jul 2018 18:15:18 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/redrum" aria-label="Profile: redrum">@<bdi>redrum</bdi></a> Ok, so, I understand that people who originally wrote TripleA source code are not here anymore and we have no idea how to change engine without harming whole work of many others?</p>
<p dir="auto">BTW. Thank you for the tip, I will try to use it! And yes, random buy would be better than holding all that money... But... I still have no idea how to force AI to buy random stuff or any - just because AI have too much money...</p>
]]></description><link>https://forums.triplea-game.org/post/14046</link><guid isPermaLink="true">https://forums.triplea-game.org/post/14046</guid><dc:creator><![CDATA[ComR]]></dc:creator><pubDate>Sat, 07 Jul 2018 18:15:18 GMT</pubDate></item><item><title><![CDATA[Reply to AI never buys resources? on Sat, 07 Jul 2018 18:06:47 GMT]]></title><description><![CDATA[<p dir="auto">Yeah, the AI will not currently buy resources as it doesn't understand the value of anything but PUs when purchasing. Only way to make the AI purchase something is have resource generating units that have low PU cost and high attack/defense/movement/hitpoints. You could then consider using triggers to remove the units or remove their combat stats.  This is pretty much a hack though and at some point the AI purchase logic will be rewritten to better handle non-PU resources.</p>
]]></description><link>https://forums.triplea-game.org/post/14043</link><guid isPermaLink="true">https://forums.triplea-game.org/post/14043</guid><dc:creator><![CDATA[redrum]]></dc:creator><pubDate>Sat, 07 Jul 2018 18:06:47 GMT</pubDate></item><item><title><![CDATA[Reply to AI never buys resources? on Sat, 07 Jul 2018 14:01:09 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/frostion" aria-label="Profile: frostion">@<bdi>frostion</bdi></a> Fantastic! Thank you... I will try the Age of Tribes.</p>
]]></description><link>https://forums.triplea-game.org/post/14029</link><guid isPermaLink="true">https://forums.triplea-game.org/post/14029</guid><dc:creator><![CDATA[ComR]]></dc:creator><pubDate>Sat, 07 Jul 2018 14:01:09 GMT</pubDate></item><item><title><![CDATA[Reply to AI never buys resources? on Sat, 07 Jul 2018 12:39:27 GMT]]></title><description><![CDATA[<p dir="auto">Yes, right now the AI cant/won't buy resources. Hopefully this will be possible in the future.</p>
<p dir="auto">A trick I think might work (if you want AI to buy resources now) is to make some resource-generating land units that must be purchased with PUs/Gold and placed by a factory. Example; a land unit called "Wood" that is purchased and placed at a town, and by/before player end turn it generates 10 Wood for the player. After the same player end turn, all of the same player's Wood/Food/Metal land units are removed from the map.</p>
<p dir="auto">The technology development in Age of Tribes works like this.</p>
<p dir="auto">But we must note that the AI, if it purchases like this is doing it in a mindless manner. It is totally random and it has no intention of buying resources. On the positive side, if the AI has a ton of PUs that it can't use because of a lack of other purchase resources, then I guess any random purchase is better than AI having unspent resources in the bank.</p>
]]></description><link>https://forums.triplea-game.org/post/14017</link><guid isPermaLink="true">https://forums.triplea-game.org/post/14017</guid><dc:creator><![CDATA[Frostion]]></dc:creator><pubDate>Sat, 07 Jul 2018 12:39:27 GMT</pubDate></item><item><title><![CDATA[Reply to AI never buys resources? on Sat, 07 Jul 2018 12:13:02 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/beelee" aria-label="Profile: beelee">@<bdi>beelee</bdi></a> Oh, ok, thank you. Stupid me! :)))) Now I understand... <img src="https://forums.triplea-game.org/assets/plugins/nodebb-plugin-emoji/emoji/android/1f609.png?v=fbe62970dd5" class="not-responsive emoji emoji-android emoji--wink" style="height:1.4em;width:auto;vertical-align:middle" title=";)" alt="😉" /></p>
]]></description><link>https://forums.triplea-game.org/post/14016</link><guid isPermaLink="true">https://forums.triplea-game.org/post/14016</guid><dc:creator><![CDATA[ComR]]></dc:creator><pubDate>Sat, 07 Jul 2018 12:13:02 GMT</pubDate></item><item><title><![CDATA[Reply to AI never buys resources? on Sat, 07 Jul 2018 11:59:37 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/comr" aria-label="Profile: comr">@<bdi>comr</bdi></a> heh heh always can use a coder  The @ thingy will notify them and they'll probably reply sooner or later. Probably sooner : )</p>
]]></description><link>https://forums.triplea-game.org/post/14014</link><guid isPermaLink="true">https://forums.triplea-game.org/post/14014</guid><dc:creator><![CDATA[beelee]]></dc:creator><pubDate>Sat, 07 Jul 2018 11:59:37 GMT</pubDate></item><item><title><![CDATA[Reply to AI never buys resources? on Sat, 07 Jul 2018 11:27:07 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/beelee" aria-label="Profile: beelee">@<bdi>beelee</bdi></a> Hi,</p>
<p dir="auto">Thank you for the tips. I prefer not to PM anyone, but I wrote also on AI thread. I will take a look at source code, maybe I could be useful one day?</p>
<p dir="auto">ComR</p>
]]></description><link>https://forums.triplea-game.org/post/14012</link><guid isPermaLink="true">https://forums.triplea-game.org/post/14012</guid><dc:creator><![CDATA[ComR]]></dc:creator><pubDate>Sat, 07 Jul 2018 11:27:07 GMT</pubDate></item><item><title><![CDATA[Reply to AI never buys resources? on Sat, 07 Jul 2018 11:24:01 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/comr" aria-label="Profile: comr">@<bdi>comr</bdi></a> HiComR You could try asking <a class="plugin-mentions-user plugin-mentions-a" href="/user/redrum" aria-label="Profile: redrum">@<bdi>redrum</bdi></a> . He codes the AI. You could also ask <a class="plugin-mentions-user plugin-mentions-a" href="/user/frostion" aria-label="Profile: Frostion">@<bdi>Frostion</bdi></a> I think this is his map. I don't quit remember though</p>
]]></description><link>https://forums.triplea-game.org/post/14011</link><guid isPermaLink="true">https://forums.triplea-game.org/post/14011</guid><dc:creator><![CDATA[beelee]]></dc:creator><pubDate>Sat, 07 Jul 2018 11:24:01 GMT</pubDate></item></channel></rss>