Jump to content

jonbaer

Community Members
  • Posts

    189
  • Joined

  • Last visited

  • Days Won

    4

jonbaer last won the day on December 28 2023

jonbaer had the most liked content!

2 Followers

Profile Information

  • Location
    Brooklyn, NY
  • Interests
    Machine learning, AI, 0ad

Recent Profile Visitors

3.595 profile views

jonbaer's Achievements

Sesquiplicarius

Sesquiplicarius (3/14)

101

Reputation

  1. 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).
  2. 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)
  3. 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 :-\
  4. 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 ...
  5. 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.
  6. 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.
  7. 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.
  8. Trying to fix this myself, there seems to be a case if you play vs. multiple AIs where the diplomacy for ally/neutral/enemy only changes once w/ a preset condition and then stays there. It would be nice to make this smarter and more challenging somehow. Is there even any docs/posts which discuss how this is suppose to work? At the moment I am playing 1 vs. 5 AIs where I will make decisions on which ally makes economic sense but it would be great if there was a decision maker on the other side in the game. Hope this makes sense. https://github.com/0ad/0ad/blob/master/binaries/data/mods/public/simulation/ai/petra/diplomacyManager.js
  9. I have only used it + compiled on OSX and Linux, when you say "it" does that mean it won't compile or the python client won't work/do anything on Windows, is there an error trace somewhere. This is tough because obviously the game itself is (without doubt) rendered beautifully on Windows/GPUs/gaming rigs but I think this bit (RL/ML/AI) is really being done more in Linux/parallel. I come in peace and hope the two camps can work together :-). I guess leaving this as a compile-time option is the only way forward. I was hoping somehow as something through the mod lobby too.
  10. I will try, I think the major issue here is probably along the lines of versioning the protobuf builds at some point and I don't know how that works. Like maybe zero_ad is a pip installed library with a version inline with the subversion id or the Alpha 23 version, etc. Everything else (beyond what is inside of main.cpp) can just be really built on as default. In other words just let python have the ability to talk to pyrogenesis and push everything else to another repo. I think there should be (or probably is) already someway to define a client/server mismatch. I don't think @irishninja needs the main build to include the clients, I could be wrong or this has probably been discussed but I didn't see it yet.
  11. I was able to fix my errors by pip3 install --upgrade tensorboardX + playing around with the zero_ad py client has been fun. One thing I'd like to figure out (this might already exist or I just don't know if it is something which can be accomplished), would be for the python client to actually inject a way to overwrite some of the JS prototypes. I will give an example, in Petra on the tradeManager it will link back to HQ for something like this: m.HQ.prototype.findMarketLocation = function(gameState, template) To me this is a decision making ability I feel like RL would be pretty well suited for (I could be wrong), but I feel like having ways to optimize your market in game (with say a Wonder game mode) on a random map would be a great RL accomplishment ... especially you would get bonus points to work around enemies + allies. Sorry I have always been fascinated w/ that function of the game, kudos to whoever wrote it. There are occasions where this AI makes some serious mistakes on not identifying chokepoints/narrow water routes, etc. But to me @ least it's an important part of the game that pre simulating or making that part of the AI smarter would be key. Also will D2199 make it into master copy? I can't seem to locate where that decision was(n't) made ... thanks.
  12. There are still some minor small issues but I got it running, I had to directly install rllib (pip3 install ray[rllib]) + obviously forgot to install the map(s) first time around :-\ It looks like I may not be running w/ the correct version of TF inside of Ray though since I get this from the logger ... AttributeError: 'SummaryWriter' object has no attribute 'flush' ... Traceback (most recent call last): File "/usr/local/lib/python3.7/site-packages/ray/tune/trial_runner.py", line 496, in _process_trial result, terminate=(decision == TrialScheduler.STOP)) File "/usr/local/lib/python3.7/site-packages/ray/tune/trial.py", line 434, in update_last_result self.result_logger.on_result(self.last_result) File "/usr/local/lib/python3.7/site-packages/ray/tune/logger.py", line 295, in on_result _logger.on_result(result) File "/usr/local/lib/python3.7/site-packages/ray/tune/logger.py", line 214, in on_result full_attr, value, global_step=step) File "/usr/local/lib/python3.7/site-packages/tensorboardX/writer.py", line 395, in add_histogram self.file_writer.add_summary(histogram(tag, values, bins), global_step, walltime) File "/usr/local/lib/python3.7/site-packages/tensorboardX/summary.py", line 142, in histogram hist = make_histogram(values.astype(float), bins) AttributeError: 'NoneType' object has no attribute 'astype' Is there something inside of ~/ray_results which would confirm a successful run? (I have not used it much yet but will read over the docs this week).
  13. Thank you, was able to build this fork and have it running now, I am currently on OSX w/ no GPU @ the moment (usually anything I require GPU for I use Colab or Gradient @ the moment) ... I wasn't able to run PPO_CavalryVsInfantry because of what looked like Ray problems but will figure out.
×
×
  • Create New...