English
Search
Main Menu
Forums

Menu

Triad's AI Experiment #1: Teaching an image model to generate BnG map

Started by Triad, October 24, 2024, 07:38 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Triad

Current AI image models can generate all sorts of different images without a problem, but they won't be able to handle extremely niche things, like a Worms map.

But things are different with local models (the ones that you can run on your own PC). You can create small extra datasets called LoRAs to teach them new concepts (a person/character, an artstyle, an object, etc). Image models equipped with a LoRA will be able to generate images containing the LoRA concept.

So I thought, why not try to create a BnG LoRA!

Technical details
  • Base model: FLUX.1-dev
  • Training UI: Flux Gym
  • Training dataset: 23 BnG maps (converted to PNG and resized to 1920x720) from this map pack.
  • Captioning template: {terrain_name} themed BnG map
  • Training duration: 2h11m
  • Training settings: Default Flux Gym settings, except:
    • Trained for 8 epochs.
    • Image size of 720px.
  • PC Specs:
    • GPU: RTX 4070 Ti SUPER 16 GB
    • RAM: 64GB DDR5-6000 CL30
    • CPU: Ryzen 5 7600X

Results
LoRA model succeed at some things, failed at others.

Here's four different generations using the prompt "forest themed BnG map":
BnG_Test_00001_.png

As you can see, the first problem is that it does not use a black background for maps.

Adding "black background", 'black sky", or"'pitch black sky" will sometimes fix these problems, but not always. Occasionally, it also darkens the terrain:
BnG_Test_00002_.png

Now, we have a f*ck load of forest maps, so how about other terrains? Better yet, how about non-existent terrains? It was able to generate BnG maps with unique terrains, but it occasionally generated weird-looking terrain objects:
BnG_Test_00003_.png
BnG_Test_00004_.png

Potential ways to improve the model
  • Increasing the number of images in the training dataset.
  • Diversifying training dataset with more maps with different terrains, including custom terrains.
    • By increasing the diversity, the model could become better at generalizing (i.e. it can become better at generating maps with non-existent terrains, rather than only being good at generating maps similar to those in its dataset, such as forest maps).
  • Using more detailed captions for training dataset images.
    • This might solve the non-black background problem, and could potentially give more control over terrain objects.

Closing remarks
Overall, this was a fun experiment. Results may not be perfect, but there is one thing we should keep in mind: This is the worst AI will ever be. This tech will keep improving. Who knows, maybe we'll be able to automate map generation for every scheme one day.



Triad

Some snowy forest remixes as a bonus (they all should work on WA):
AI_BnG_1.png
AI_BnG_2.png
AI_BnG_3.png
AI_BnG_4.png
AI_BnG_5.png



TheKomodo

Great work Triad! Some of these are stunning to look at, some of them even look more than suitable for good BnG matches.

Any chance you can put all the good ones into a Rar archive and upload it? Or even better make an AI_BnG map pack and release it?

Triad

Quote from: TheKomodo on October 24, 2024, 07:58 PMGreat work Triad! Some of these are stunning to look at, some of them even look more than suitable for good BnG matches.

Any chance you can put all the good ones into a Rar archive and upload it? Or even better make an AI_BnG map pack and release it?
Thanks! Yeah, I am planning to make a map pack. Maybe I'll even go for a second training run to see if I can improve the model, so I can generate even better maps.



TheWalrus

holy shit who needs wkterrain when ai just churns out original terrainsets in no time

i know komo disagrees but tell it to 50/50 mirror and it will be optimal

TheKomodo

Symmetrical maps are less balanced because you can just copy opponents position and shots for starters. If they miss, but you see it's close, you can copy it and hit it and know it will work. This is my biggest problem with it among a few. Even if they hit you, you can copy their shot for revenge if you weren't pushed enough. I don't like being able to copy my opponents shot like that.

One could say, but what about Forts? Well, this ain't Forts and you don't have 4 worms or all those other strong weapons so it's a lot different when it requires pixel perfect precision for BnG which is more challenging than any other artillery scheme.

Although I admit, symmetrical maps do look nice, they are less practically challenging and more predictable... They are for less experienced players imo. Though they are fun for fun I guess, but for competitive matches, you're insane lol.

Sensei

Since you always speak against premade BnG maps, especially those symmetrical ones Xan and me uploaded and people apparently love to play on - why did you upload like 200 (?) of yours few months ago? It's quite contradictory behaviour, @TheKomodo .

@Triad - this looks awesome. Just glanced through maps but didn't read whole text. Will do it asap.

Triad

Training the AI on symmetrical maps might be much easier, because you can just use halved BnG maps. You can always mirror them on photoshop later to turn them into full maps.

Since you'll be dealing with 960x720 images rather than 1920x720 images, you can speed up training and map generating times.



TheKomodo

Quote from: Sensei on October 25, 2024, 07:57 AMSince you always speak against premade BnG maps, especially those symmetrical ones Xan and me uploaded and people apparently love to play on - why did you upload like 200 (?) of yours few months ago? It's quite contradictory behaviour, @TheKomodo.

I wish for once you would do at least a LITTLE investigation or research. It's not contradictory at all considering the reason why I shared them.

The whole point of those maps is to remix them when you use them, use them like a template, reseed, draw little lines or dots here and there.

It's actually embarassing how little you pay attention or do any kind of research whatsoever, especially when the descriptions of why I made the maps for that specific purpose are in each map pack:

https://www.tus-wa.com/maps/mappack-604/

https://www.tus-wa.com/maps/mappack-608/

https://www.tus-wa.com/maps/mappack-609/

I even made a tutorial people can watch to help them make their own or understand how to remix them.

YOUR maps on the other hand, are premade PNG maps, you cannot remix them as you can the maps I made because the objects are already there set in stone.

It's not contradictory at all, in fact I did all that in an effort to counter premade maps, by teaching people how to make/remix their own in a quick and simple way.

But of course you like to start drama with false assumptions as usual.




Triad




Sensei

Quote from: TheKomodo on October 25, 2024, 01:33 PMBut of course you like to start drama with false assumptions as usual.

I've just asked you a question. No drama was planned or intended. People have ingame map maker to draw those .bit maps. Don't see a reason to upload 200 of those templates if you're so much against repetitive BnG terrains. Majority of players will just download it and play it without changing anything, that's a fact.

I really don't mind having your BnG maps around. More - the merrier. They're actually quite good imo. Just thought it's strange you out of all people uploaded them. Relax with accusations.

TheKomodo

You falsely said my behaviour was contradictive, while it wasn't. So I have to yet again defend myself with actual evidence, which seems to be the norm every time we butt heads on here.

If you had even bothered to look at even one of my map packs you would have seen the writing:

Quote50 BnG Maps!

You can use these maps in a variety of ways!

Try not to use them more than once without editing/remixing them!

You can reseed the objects and change the terrain type to make them fresh for new matches!

If you would like to learn how to make your own BnG maps, or even learn how to remix maps to keep them fresh, you can watch the following tutorial on YouTube:


The point is that you rush to accuse people of things without taking the time to see if your accusations are true or not.

Also, since there was a question in there I wanted to take the time to answer it honestly.

It's funny how you never apologize when you're wrong as well, even when I show evidence that you were wrong, again, you still just double down and try to make it seem like you were innocent and I'm the one who messed up! :D