jonbaer Posted December 23, 2023 Report Share Posted December 23, 2023 Was trying to adjust the Archipelago random seed to get something similar but can't come close, wasn't there a project a while back to produce maps based on supercontinents (it may not have been this game), looking for the layout close to https://en.wikipedia.org/wiki/Pangaea_Proxima This map is primarily for 8 AIs (controlled via random LLM strategies) so doesn't have to be perfect, more for research. 1 Quote Link to comment Share on other sites More sharing options...
hyperion Posted December 23, 2023 Report Share Posted December 23, 2023 1 Quote Link to comment Share on other sites More sharing options...
alre Posted December 26, 2023 Report Share Posted December 26, 2023 I'm afraid to ask, but just out of curiosity, how should "random LLM strategies" work? Quote Link to comment Share on other sites More sharing options...
jonbaer Posted December 27, 2023 Author Report Share Posted December 27, 2023 Well (in a general sense), the current overall global behavior is really locked and not based on anything, for example here: // Petra usually uses the continuous values of personality.aggressive and personality.defensive // to define its behavior according to personality. But when discontinuous behavior is needed, // it uses the following personalityCut which should be set such that: // behavior="aggressive" => personality.aggressive > personalityCut.strong && // personality.defensive < personalityCut.weak // and inversely for behavior="defensive" this.personalityCut = { "weak": 0.3, "medium": 0.5, "strong": 0.7 }; Getting the behavior to decide on actions based on overall game state, an LLM given some objective should be able to decide + use random choice (when it sees the entire board/minimap/ally info). Should be clear I am not using an LLM to "play the game", just logging decision points @ the moment. 1 Quote Link to comment Share on other sites More sharing options...
jonbaer Posted December 27, 2023 Author Report Share Posted December 27, 2023 I realize this might sound like a crazy thought, but I realized there was an "encyclopedia" being created/generated @ https://github.com/TheShadowOfHassen/0-ad-history-encyclopedia-mod ... imagine using some of that as the base of behavior for some civs and leaders. The thing about current LLM states are just that they already include game/military/economic strategy from training data, fine tuning on that information would be an amazing feat if you could replay it back. Nowhere near that point but thinking out loud. 1 Quote Link to comment Share on other sites More sharing options...
Vantha Posted December 27, 2023 Report Share Posted December 27, 2023 You mean (for example) Pericles would go all-in on turtling, build walls and avoid fights (on land)? 1 Quote Link to comment Share on other sites More sharing options...
Grautvornix Posted December 27, 2023 Report Share Posted December 27, 2023 I do like the idea proposed by @jonbaer . This should possibly be more a default setting that can be changed, e.g. in the game settings: General Strategy = "according to selected hero & civ" (for suggested reading: link to 0aD library) or "manual override as defined in the standard game settings independent of selected civ/hero" (still need to find the right words here) . Quote Link to comment Share on other sites More sharing options...
jonbaer Posted December 28, 2023 Author Report Share Posted December 28, 2023 (edited) I don't really know how well this works in principle, I mainly took it originally that Petra should be moved out into it's own mod w/o public and nearly all the managers should be exposed to zero_ad.py (my main focus was https://github.com/0ad/0ad/blob/master/binaries/data/mods/public/simulation/ai/petra/tradeManager.js#L587) but since multimodal LLMs can make judgements on strategies from gamestates/minimaps/Atari(like) bitmaps it might make sense to query it once for general strategy and then as the game progresses check for changes in strategy (using the LLM is a bit of a cheat/hack + no way of knowing if you get the best strategy). It would be a little like say reading all books on Themistocles strategies + presenting state (or minimap) for next best set of build orders or something, ie "He persuaded the Athenians to invest their income from silver mines in a war fleet of 200 Triremes." ... but then again looking through some of the managers quite a few methods have already really been somewhat optimized (and LLM would probably ruin some things). I think I looked @ https://github.com/0ad/0ad/blob/master/binaries/data/mods/public/simulation/ai/petra/startingStrategy.js#L207 before as well. (Also bear in mind my game + map setup is always the same + conditioned for this so it doesn't apply to the overall game) and swap to MicroRTS for a "lighter version of 0AD", https://github.com/Farama-Foundation/MicroRTS-Py ... Edited December 28, 2023 by jonbaer 1 1 Quote Link to comment Share on other sites More sharing options...
ShadowOfHassen Posted December 28, 2023 Report Share Posted December 28, 2023 I want to just point out that unlike how ChatGPT says, Brasidas died around the 400 B.C. He did not live anywhere close to the year 0 A.D. Also, I think the LLM is hallucinating costs for units. It also spends 150 wood when you only say 100. You'd have to get a pretty good LLM to have it not do that with 0 A.D. However, I do like the idea of having customizable AI, probably not for the skirmish because having Athens's always do the same strategy could make the game repetitive, however having AI in campaign act like the actual generals during history would be cool if it would play well also. 1 Quote Link to comment Share on other sites More sharing options...
jonbaer Posted December 28, 2023 Author Report Share Posted December 28, 2023 The LLM is a full time hallucinating machine :-) it was meant to be a (half) a joke. However I think at some point you can feed (or "fine-tune") it with a more in-depth version of a game manual and have it work pretty decent (definitely not as fast as what might be required for RTS) but more as a critic for moves maybe. I recently read Sony would adjust settings in realtime (https://insider-gaming.com/sony-patent-game-difficulty/) which seems a bit (odd) interesting (I thought tons of games already did this). It would be actually kinda cool if say you did spawn a Themistocles or hero you got a chat/hint message from them on your gameplay if human vs. AI ... but that is future talk on running locally or remote (ie OpenAI API, etc.) - who knows maybe that day is sooner than realized :-\ 1 Quote Link to comment Share on other sites More sharing options...
alre Posted December 28, 2023 Report Share Posted December 28, 2023 LLMs are obviously great if you want your bot to send chat messages to the player, otherwise they are overkill, by far. the resources needed to run a LLM alone are larger than those required to run 0AD. Quote Link to comment Share on other sites More sharing options...
jonbaer Posted December 29, 2023 Author Report Share Posted December 29, 2023 Well there is a race @ the moment to quantize and make them small enough but I agree ... you would get just as much joy storing random text in a mod. I think I found a couple of random seeds for my map that I think can work for my original objective. If I had a feature request here it would be to freeze/label the seed as a new map somehow (sorry if this is already possible) Quote Link to comment Share on other sites More sharing options...
alre Posted December 29, 2023 Report Share Posted December 29, 2023 18 hours ago, jonbaer said: Well there is a race @ the moment to quantize and make them small enough but I agree ... you would get just as much joy storing random text in a mod. I think I found a couple of random seeds for my map that I think can work for my original objective. If I had a feature request here it would be to freeze/label the seed as a new map somehow (sorry if this is already possible) you can create the map on atlas and save it as a non-random map. Quote Link to comment Share on other sites More sharing options...
jonbaer Posted December 30, 2023 Author Report Share Posted December 30, 2023 If you select say Random/Archipelago a seed is dropped + it has to be extracted. You have to hack around (both to get the seed + setup a new game save w/ it for another round). Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.