keronvalley.blogg.se

Endless sky bactrian build
Endless sky bactrian build









endless sky bactrian build
  1. Endless sky bactrian build how to#
  2. Endless sky bactrian build code#

There’s one function that calculates the cost, one for the benefit, a few extra constraints are thrown into the mix and everything is handed off to the z3 SMT solver.

Endless sky bactrian build code#

In the code below, the somethings have names of x1, x2, x3 costs of 100, 50, and 15 and benefits of 83, 42, and 13. Given a limited budget, what’s the largest benefit I can get that fits? Something has a name, a cost, and a benefit. I decided to cut that port down into the simplest thing that would demonstrate to me that this approach was going to work. The Haskell library I want to use has a port of the virtual machine packing example from the z3 tutorial. The heavily commented Z3 tutorial example in this post has three Virtual Machines that can run on one or more of three host servers, let’s shrink that down a bunch. Integer linear programming! SMT solvers are much more general than ILP, but they can also do that, with their usual “can do, but won’t be fast” kind of approach.Ī bunch of searching around turned up the z3 optimization tutorial which does the same thing, but then says “In this example, the boolean encoding is not really natural.” They rewrite the problem with a bunch of Integer values, and that’s what I want! Look, I totally zoned out, can you repeat all that stuff in much smaller words? That is, a ship can have zero or more of each engine, and each of those integers has a particular value.

Endless sky bactrian build how to#

I didn’t get anywhere, after hours of trying to figure out how to express the problem.Īfter much skull sweat, how to express the idea came from Vaibhav saying “Express it as a sum of Integers”. I read the examples several times, and finally chose the virtual machine packing example as a starting point. With help (and demo code) from Vaibhav, I chose the sbv Haskell library as a friendly wrapper for talking to SMT solvers. The term SMT Solver is satisfiability modulo theories which is a generalization boolean satisfiability which is roughly “I have a boolean expression, is there any combination of inputs that will make its outputs true? Happily, Endless Sky is open source, so I can get engine stats out of the github data files. Problem Statement: A ship can hold 210 units of engine capacity, and I want a balance of go fast and turn. That led to many days of reading and frustration, but finally VICTORY (well, sort of). I also investigated many other options but finally decided to try an SMT solver. How do I solve this once and forever?ĭavean suggested I use into integer linear programming. Sometimes these new components have big benefits.īut hey, I’m at a programmer’s summer camp, and this looks like a constraint problem of some sort? Given the list of components with their stats and a particular ship with a certain amount of space for engines and weapons, I should be able to calculate the optimal components, right?įor Endless Sky my question is, how can I maximize the value of thrust and turn with without exceeding a certain value for engine capacity?īut I have no idea how to do that! Even better, when I do it by hand, I keep finding novel solutions that are better than I thought was possible.

endless sky bactrian build

I like to play this game Endless Sky and part of the games is exploring the starmap discovering different nations offering unique ships and ship components. The best fix I’ve found is to write code to solve the game once and for all. I get addicted to games I play on my computer. It can likely solve your problem but is rarely the best at solving problems in a particular domain.











Endless sky bactrian build