#[Discussion, not a guide] Best autoloader layouts for APS turrets
1252 messages · Page 2 of 2 (latest)
worst comes to worst I can do a jank and literally shove the release version into it
C# lets you include resource files
some extra logic to switch which one depending on OS
Best get to your implementation of the Traveling Salesman problem 
also I think I figured out how I might get some form of 5-clip
I could have the cooler cell type have no collision with itself (but still with normal pieces)
with that and a bit of extra to make grouping not instantly break it would probably work
iirc it was mman.h that was the issue for me, might need to use this https://code.google.com/archive/p/mman-win32/
you should probably make the turret well area black and the surrounding white, cuz with it like that, it looks well... hard to actually see
well it took me quite a while but I managed to get cell types and 5 clip working (at least I'm pretty sure)
This is not effective though
You want to have 2 autoloaders per connector
coolers are set as self-intersecting so it results in the same thing
that's not optimal for 15x15
32 loaders is 2 loaders less than the optimal solution (34) that the solver finds
Okay so
1 autoloader, 5 clips and 6 intakes
They could be rearranged to have the same shape as a 3clip 2m autoloader setup
how tho, like is this a 1m auto specific thing?
Yes
could you send a blueprint or screenshot in the chat?
that's an... interesting loudout. Is it good?
Brrt
finally managed to fix symmetry for 5-clip
turns out it wasn't accounting for cell type when checking for symmetry groups so they were all self-conflicting
I think I'm probably going to omit the shape editor for initial release and instead just get the export to prefab working
Realistically, you've covered 99% of use cases
Shape editor is just nice for future-proofing or if people want to try other system Tetrises
Export to blueprint is absolutely cracked if it works. Also would request different size and shape center holes in the area generator for turret-ception
update: blueprints are a pain
specifically getting the right blockdata string is proving difficult
pretty sure I have everything else
BEHOLD THE FIRST GENERATED PREFAB (yes it's wrong I'm aware)
ITS WORKING
side note
for whatever reason the z? coordinate has 0 being the center instead of the edge
so to get it you have to do relZ - 0.5 * maxZ which is strange
Awesome
amazing
Fixes the last bugs for export I think, currently prepping the repo for release - might have it done today
can export have an option to attach ejectors
future version
currently I'm trying to figure out how to make the windows release build not commit sudoku
for some reason it hates existing
yeah for some reason only the windows release build dies for certain UI updates
something weird about CoreMessagingXP dying
I'll see if I can figure it out tmr
đ«
well it still hates me but I did figure out how to get something working
at least I can release a non self-contained version
APS Tetris Optimizer for From The Depths. Contribute to trk20/APS-Optimizer development by creating an account on GitHub.
wasn't able to get a self-contained version working because windows really do be like that
still works though
LMK if you have issues running
If you figure out how to accurately estimate how long it will take, please consider making an issue with the exact details or submit a pull request.
I think this might literally be a CS PhD project in and of itself lol
I'll see if I can get it running, probably tomorrow night
grid width is 14 instead of 15 wide. also seems to be causing the thing ur using for the circle to spaz out (I think its just overflowing into the next row cuz its expecting it to be 15 wide not 15)
also its really small on 1440p (default 150% scaling). maybe add a scaler option cuz this wouldn't be usable on higher resolutions/smaller screens.
height is fine tho
i think i just entered 1416 (on accident) into the width and now its dying
yeah manual resizing and shaping doesnt fix it
(just using it not fullscreen now, why its sized different)
Oops I guess I didn't check with different scaling and resolutions
Yup that would definitely do it
I should probably check the entered dimensions before accepting
https://github.com/trk20/APS-Optimizer/releases/tag/v1.0.1
Fixed the UI scaling for 150% and 175% plus added an option to increase the grid scaling
remember to get cryptominisat5.exe from their releases page and drop it into the same folder as mentioned in the installation instructions
I never put the minisat file into the folder, so i did that now the solver outputs a result now. whoops!
The improper shaping bug is still there though (not that you said you fixed). now that I am getting an output it seems that this may be a display/input issue only, as the output is warped the same way (implying that it isn't warped under the hood). I havent gotten a chance to spawn the output ingame though, so heres what it output if you cant reproduce the bug.
Just to check
windows desktop scale 150%, UI scale 2, 15x15 grid, and you're on the latest release
I'll check again, was pretty sure I fixed the UI scale but might need to add some extra tolerance
I havenât tested if it works at 100%
I think the issue is how itâs displaying the values, Iâm guessing you are storing the grids as one long 1d array/list, or at least thatâs how you are displaying them.
And itâs displaying each element in a line until it runs out of space, then looping to the next line
I got updated to windows 11 by my dad, windows 10 superiority, never update, W11 is badđ
All the UI for W11 is worse(IMO).
Ye I donât plan on going to win11
I count 16x14 in the actual grid. Weird
Er.. 15x14
thats been the issue
figured out what the problem was
only happens if it's launched with 150% scale and not if it's launched at 125 then changed to 150 (which is how I was testing it)
i just tested changing it to 100% (launched in 150%), and it went tonormal when switched to 100, and then messed up when switched back to 150%
wth
it fixes itself at 200%
rounding error lol
mb, I've only been halfway paying attention, thought it was just indexing wrong đ
oh god changing the ui scaling also cooks it
kinda, i think a part of why this is happening is that the rowlength is being assigned based on the width of the viewport thing/width of boxes instead of the actual rowlength.
so throwing floats into the equation (via ui scaling to non-multiples of 100) borks it by making it slightly too small to fit the number of boxes it needs to.
thats the only wayh i can explain the rows overflowing into the next row
https://github.com/trk20/APS-Optimizer/releases/tag/v1.0.2 hopefully it's fixed for good now
oh god mixed 3 and 5 clip why
basically the UI framework doesn't have a proper resizable 2d grid so if it doesn't have enough size for a row it wraps around
I just had to add a few pixels of margin so that doesn't happen with the scale rounding errors
It just does
Try the symmetry options, usually hard vertical symmetry works best for 5 clip
woah its even better on 15x15
damn it can find really high fill % on 5 clip compared to 4 clip
what da hell turning on symmetry gave more clusters
why did i just try to do rotational syymmetry with 5 clip
damn it actually worked really well
it would be useful to have a counter for how many single cooler lines there are (ones with only 1 cluster instead of 2 attatched)
so it would be easier to compare different tetrises
there was a number of hours spent trying to get 5-clip to not break all the other logic
glad someone is actually using it lol
heh, yeah it looks complicated
funny how on 15x15 it works best on rotational 180 hard symmetry
8 unpaired clusters
the way it actually works is that it allows coolers to self-intersect, which means for volume filling it will pretty much always go for the maximum amount of paired clusters
also why it takes longer to solve compared to 3/4 clip usually
it can't assume the number of cells filled is a multiple of the LCD of enabled shapes
something like that
3 clip will pretty much always fill the space best
couple suggestions, then i go back to studying,1. unpaired cluster count, 2. when its done, have it rotate the unpaired clusters so the cooler is in contact with an empty block (so components can be attatched). i'm not sure how hard that would be but it would be nice
The answer for 2 is hard
It would have to do a whole other solver loop with a different problem deconstruction
oof
One plus side to 5 clip is that you can stack it (upwards) and export supports that
ngl 5 clip is defo faster than 4 clip
2.5 mins for 23x23 5 clip but im on 8 mins for 4 clip and ist still not done
didn't do rotational symmetry though that might've helped
930 and only attempt 12 this is gonna take too long
Hard symmetry makes the solution space much smaller
Especially for more sparse layouts like 4 clip
That looks pretty nice
yeah it leaves 1 cpu core so the UI doesn't have a stroke
You run the app file
It should be called optimizer v3
hmm, seems like a weird name considering it does
Should probably be called aps generator or something
wth are you doing with extentions
double click that
its an application, It sounds like your trying to run it like a peice of code or something
source code?
15x15 armored
Sorta leftover from the initial name I gave it lol
This is the third time I try to tackle the same problem, and once I got the actual core logic working I made a UI for it, never bothered changing the name to something that made more sense
Glad to hear it
Was an absolute pain to implement lmao
export to blueprint was almost painless, only feedback would be letting you set a default path / have it remember the last path so it is literally one or two clicks instead of 4 or 5
but tbh that's a crazy feature already
looking forward to when it also does ammo inputs and ejectors :^)
god damn this thing is fast, solved a 25x25 in less than 2 minutes
What on earth were you doing to make 25x25 take more than 1?
5 clip soft 4 way symmetry maybe?
could just be differences across cpus actually but still wouldn't expect close to 2mins for 25^2
laptop
it was like 90 seconds
R9 5900H
i think it was 5 clip rotational 180 or vertical. also im doing 25x24 to get the symmetries to behave naturally for a front armored turret
took 1:50 for 4 clip rotati9onal 180 hard
ngl ive found that 4 clip tends to take the longest
heh, its different every time you do it wwith these settings
this one gernarates super rarely with soft settings. i think i got it with hard too at one point but im not sure
huh must be CPU - I'm getting ~40s for 4-clip 25x24 180 degree hard symmetry
7800x3d go brrr I guess
bro, why would you not expect that to do anythingđ
of course it's gonna be faster on top of the line hardware
you have 16 cores and +40% faster cores
*8 cores but yeah I get your point
crypyominisat probably favors the large cache size as well
@hot nova something I thought of recently - have you considered beltfed tetris yet?
Would be something like choosing 2-6 ammo intakes, but for those less than 6 you would have permutations of intake placement
I've never really seen beltfed tetris so idk how that it's supposed to look
It's one autoloader + one clip, then fitting as many inputs on that as you can. Most people just do like a 5x5 windmill thing with it
sorry, I have stopped playing as much FtD as I used to, and havenÂŽt really been keeping up with the chat
is it doing well?
Trk finished his solver, posted over in the other thread, handles basically 99% of use cases, has neat features like export to prefab, and the biggest pro - it isn't in MATLAB 
so itÂŽs a complete ship of Theseus
no parts of my original code remain xd, prob for the better given my level of optimization xd
what size have you managed?
I've not really pushed it, but I know the SAT solvers can get into the 30s for single solutions before they start to chug a bit
What is funniest to me about this project is that even before the solvers started coming out, basically all the practical sizes were found 
That being said, I think the 5-clip tetris in the new solver is really neat and actually better than what people came up with prior
And also being able to specify symmetry is nice too
33x33 180 rotational symmetry
13x13 and 15x15 are practical enough I think xd
recently made a 21x21 with it
probably going to end up on multiple future designs of mine because I like large guns
probably going to look at implementing ejector/intake placement at least for the bottom sometime this week
no, 2 input for max density and 4 input for max cost efficiency
Sorry if this is off topic but Is there a reason horizontal layouts arent discussed more often? This design fits 4 meter clips into a 13x12 foot print that is only 3 meters tall. Theoretically this layout is both more efficient for space and material because the opposed autoloaders essentially halve the length of the guage snake.
Probably because vertical layouts are a lot more modular/easy and fast to design the exact gun you want whereas horizontal requires unique tetris for most combinations
Youâre never going to have a gun with such low cooling / recoil / rail requirements that that could amount to any savings
Theyâre not common because itâs not very convenient. The shapeâs more complex and the space more limited.
due to the low amount of granularity you may also end up with a decent amount of unused space which people might not like
one possible advantage is that a piercing shot could take out only a single loader cluster instead of a whole line, but they're much less convienient to fit and don't really have reusable layouts
also, (from what i know) its rare for you to have a space that is that wide but shallow like that. so you'd have to stack this slab ontop of itself, wich would be less space efficient due to the ammount of extra coolers required for connecting when building in smaller spaces, wich would be less when compared to regular tetris. the holes that are gonna form are also more difficult to fill with stuff, and would be more difficult to make, with not many benefits.
Just realised the 3 clip solver could be used for single-input laser tetris as well
Kinda yeah
At some point trk will code user-definable pieces and then you can use it for pretty much any tetris that is simplifiable to 2D
Ofc that is very limited still
the actual work for the solver allowing user-definable shapes is already mostly done - it's just the export mappings and UI that would be tricky
cell types themselves are also very generic
I think I saw something about someone exporting all the block types - if I figured out how rotation was encoded instead of just copying the value blindly I could theoretically end up supporting anything, although unsure if anyone would use that
I am trying to use the APS optimizer and I am getting this error. What have I done wrong?
Read the README.md file on github.
This will tell you that that part must be downloaded separately, and where to download it from.
@snow basin
ok thanks
Good news: I'm finishing up the implementation of allowing a generated bottom layer of ejectors and ammo intakes for the 3 and 4 clip exports, will probably make a prerelease later today
https://github.com/trk20/APS-Optimizer/releases/tag/v1.0.3 pretty sure it works, LMK if there's any issues with the new export option
holy hell I may have finally figured out how to have it not be annoying with .net runtime
https://github.com/trk20/APS-Optimizer/releases/tag/v1.0.4
ok, now bundled correctly (I think) - also now auto-downloads cryptominisat if it's not there already
cryptominisat sounds so much like a crypto mining library lol
next goal: optimize the code so much you finish almost instantly and mine cryptocurrency for a few minutes before returning
You get APS Tetris, @hot nova gets to use your GPU for sweet sweet Bitcoin, check the EULA 
still a pretty sweet deal
Just had a thought: the code is already in C# - maybe I could eventually make this into an actual FTD mod
Although I haven't made a mod yet so not sure how hard that'd be
anybody running linux that can help me test a linux compatible version of the solver?
VirtualBox (which I usually use for testing on linux) doesn't work because it doesn't expose the right CPU instruction sets for cryptominisat
Yay!
Thanks!
onedrive fucks with everything I'm not surprised
yeah just an FYI to make sure when you download it you KEEP IT ON YOUR PC
how would someone launch this on linux?
it should just work
Wdym what app? This discussion is about trk20's aps optimiser program, the latest version is available here https://github.com/trk20/APS-Optimizer/releases/tag/1.0.7-pre
ok got it to work
why did i make my turret 31x31 man its taking like 2 years
is it still running? I don't think it's going to finish
i ended up putting symettry to quadrant for it to finish faster
In almost all cases symmetry will make it faster to solve and be just as optimal, I personally don't use it without - usually hard vertical symmetry
As a sidenote: I have absolutely no clue how to estimate how long it takes, I've tried
now that i think about it
wouldnt it be possible to do something like this (or atleast a simplified version of this) for cram too?
it wouldnt be the most optimal but its good enough for something to start on
It's called basic 3d cram.
