ah heck. i was looking through old text files and found an old semi-arbitrary problem i was trying to solve. now that i know how to solve it, i feel obliged to finish it even though it's pointless.

a possible excuse: it's another place i can try and test my bit-blaster with

actually i should use this as an excuse to learn how to use box-drawing characters programmatically. could come in real handy.


looking good
(yes they aren't strictly hexagons)

the equations at the bottom don't actually work for other sizes

fixed those bugs and got hex distances working, plus i can now place text within the boxes. screenshot later i guess. now i can start on the solver stuff

nevermind i just finished the whole thing

it's like a skill tree where you start in the center and there's constraints on the six corners for costs and total costs. it has 3-way rotational symmetry. and yeah, these squares would be rendered as hexagons outside of a terminal.

also there's a constraint that the sum of all costs is 255. anyway i need to go to bed, maybe i'll try to make this easier to look at tomorrow

i made a bunch of settings like optional stumps that are impassible

long description 

here's the code if you want to mess around. you'll also need to install picosat. eaguru.guru/t/hex_problem.py — cnf.py has the cleanest code, z0.py is okay, hex_problem.py is pretty sloppy.

also you can set everything to 0 (except hexrad and maxcost) to remove their constraints

i added rotation and mirroring but i haven't updated the links yet

@notwa these are so pretty! i love a good optimization problem :)

Sign in to participate in the conversation

Cybrespace is an instance of Mastodon, a social network based on open web protocols and free, open-source software. It is decentralized like e-mail.