r/Kos • • 29d ago

Ops on vibe coding?

Ik Ik…

But seriously, do you think it’s wrong or right to generate programs for kos with ai? what about other use cases?

0 Upvotes

62 comments sorted by

17

u/j-steve- 29d ago

Personally I never use AI to write my kOS scripts, it removes any challenge or learning for me. I use AI to help me learn about orbital mechanics though

5

u/Sufficient_Bee 29d ago

That's exactly what I do. At work, I don't care about vibe coding, I have to be fast and efficient. With KoS I want to learn and build something with my hands, even if I have to spend hours figuring out orbital mechanics

8

u/ckow 29d ago

Nobody should tell you how you have fun in a single player game. If you enjoy using AI, go for it.

0

u/ShadcnUI_Odi 29d ago

You’re a pro-ai, aren’t you -_-

1

u/ckow 29d ago

Of course! It's a tool! just like the internet was back in the day. Lots of resistance for the internet too (although the AI resistance is unique)

1

u/JitteryJet 23d ago

Some people have an emotional reaction to AIs. Especially artists (with good reason).

I have used AIs and people have become literally hostile. I don't care, some people got hostile when I made a series of videos on how to use MechJeb to play KSP. It all seems rather childish.

0

u/ShadcnUI_Odi 29d ago

There’s a good reason. AI can be just another abstraction layer, but just like people never fully abandoned low-level languages, people should not forget how to code. If you could force people learning to code rn to be 100% solo, non-ai devs for five years before letting them touch AI, I would be pro AI as well.

The thing is, this isn’t quite a tool, in the traditional sense. It’s not just an abstraction layer, because it could just as easily create something instead of abstracting an idea from another person. Besides the fact that such ideas as AI comes up with could be incredibly harmful to humanity, there is also the danger that humanity loses the ability to do things for itself.

I mean we’re heading towards a The Machine Stops scenario here. Maybe read it. It’s interesting, even if you are pro AI.

https://www.cs.ucdavis.edu/~koehl/Teaching/ECS188/PDF_files/Machine_stops.pdf

3

u/Polymath6301 29d ago

I tried it for fun about 5 months ago with Copilot. It finally figured out how to design .craft files that were vaguely flyable. It was absolutely rubbish at any Kos code that was novel. It managed to clean up a launch script of mine, after 145 tries.

It absolutely couldn’t plan a transfer to Mun from Kerbin orbit.

I imagine Codex would do better these days, but I won’t try it until I’ve finished some other projects.

1

u/ShadcnUI_Odi 29d ago

Try dropping in the documentation and using Claude. Sonnet may work but preferably opus, to waste more water.

1

u/luovahulluus 29d ago

I've been using free-tier Claude (Sonnet 5.5 with thinking level set to high) to create kOS scripts. I'm amazed how good it is. Free Gemini was trash, ChatGPT hit the limit very soon and asked me to wait 24h before I could continue.

With Claude I can often one-shot pretty complex tasks, and once I hit my free-tier limit, I only have to wait 5h. It can check the syntax from the online docs by itself.

12

u/Admiral_Eversor 29d ago

I don't get using AI for hobby stuff. If you're not actually gonna do it yourself, what's the point? This isn't work, this is real life. Why bother if you're just gonna take a shortcut?

It's like going on a hike and then driving to the top of the mountain. Kinda pointless honestly

11

u/Effehyou 29d ago

Why would anyone use power tools for hobby woodworking projects? Why not use hand saws, chisels, etc? What's the point of woodworking if you're going to just take a shortcut?

0

u/Admiral_Eversor 29d ago

That's not the same thing at all. It's the difference between using a drill, and just telling a robot to make your bench for you.

3

u/Technical_Income4722 29d ago

it depends on what your end goal is. If you want a bench and don't care how it was made, then so be it. If you want a rocket to fly and intercept a missile in KSP and aren't really interested in coding it yourself, then so be it. Some people enjoy the coding, some people enjoy the designing.

I could see myself wanting to focus on the spacecraft design rather than the scripting, for instance.

2

u/Effehyou 29d ago

That's not an accurate analogy, either, unless the enjoyment you get from playing KSP comes entirely from writing kOS scripts (in which case the kOS script is the "bench").

I think for most people kOS is a tool to automate the more tedious parts of KSP, not an end unto itself. For example, if I want a kOS ascent script, it's because I don't want to have to manually pilot each rocket into orbit, not because I have a great desire to write the script.

5

u/nuggreat 29d ago

If you don't want to write code to automate parts of KSP kOS is the wrong mod for you and you should instead use one of the canned automation mods.

1

u/Admiral_Eversor 29d ago

Yeah idk what the ai adds here lol. Kos presents a fun coding problem, idk what the point of short circuiting that is.

1

u/ShadcnUI_Odi 29d ago

I mostly agree. However, if you’ve been doing it for a while and you give the AI very specific instructions effectively describing the architecture in pseudocode, at that point you’ve just made a compiler. Just telling it “make X and don’t make mistakes” is a waste of time but I think Linus was right about vibecoding in general…

2

u/Admiral_Eversor 29d ago

Idk who Linus is but I honestly of you're gonna rigorously pseudocode into an LLM you might as well take the 10% extra time and just write the code in the first place. Seems like a bit of a needless shortcut for something you're supposed to be doing for fun

1

u/ShadcnUI_Odi 29d ago

Linus Torvalds? You really don’t know who LINUS F*CKING TORVALDS is???

You’re kidding. This has gotta be a troll or smth.

1

u/Admiral_Eversor 29d ago

What?

2

u/johndcochran 29d ago

He's just the original author of a minor little OS called Linux.

1

u/Admiral_Eversor 29d ago

Oh, fair enough. I don't really follow celebrities.

1

u/ckow 29d ago

It sounds like you don't follow great coders and system designers.

1

u/Admiral_Eversor 29d ago

Yes that's what I said

2

u/ShadcnUI_Odi 29d ago

I mean only like 90% of computational devices on the planet run Linux but like…

→ More replies

4

u/Lucal_gamer 29d ago

If you're not actually gonna do it yourself, what's the point?

KOS is used for cinematics due to how much it can automate things and make them have an extreme level of precision. Having an AI code the ascent and then you record the scenes is definitely a possible use.

-2

u/Admiral_Eversor 29d ago

Just write the code? Writing a gravity turn is trivial

5

u/IJustAteABaguette 29d ago

For the average person just wanting to record a video, it absolutely isn't.

Learning to program is a big ask. It's worth it in my opinion, but others have different views.

2

u/Lucal_gamer 29d ago

Like, if you just want to get something done, and a certain tool will help you do it faster and for virtually no cost, why not use it.

2

u/ShadcnUI_Odi 29d ago

Yeah. That being said, I agree that learning to program is essential. Losing that skill as a species and relying on AI completely is an existential risk.

3

u/johndcochran 29d ago

Really?

Yes, it's trivial if you're launching to the East. Short vertical ascent, kick over when speed and/or altitude is reasonable. Then burn surface relative prograde until out of the thick soup of atmosphere (adjusting throttle to keep ETA to Apoapsis something reasonable like 50 seconds, plus or minus). When high enough, go orbital relative prograde for your burn and you're done.

But, notice I said launching to the East? If you did the same thing launching to the West for a retrograde orbit, you would have a far less efficient launch. And I'm not just talking about the "free" velocity you get from Kerbin's rotation. The shift from surface relative to orbit relative prograde is significantly different for a East launch, vs a West launch. For an East launch, the orbit prograde has a lower angle above the horizon then the surface prograde. So, you pitch down when changing references and more of your energy goes towards increasing horizontal velocity. But, the westward launch, the orbital prograde has a higher pitch than the surface prograde. So, if you switch, you pitch up and get a high loft orbit and an extremely punishing circularization burn. So, try writing a general purpose launch script that allows arbitrate orbital inclinations. Not trivial at all.

2

u/nuggreat 29d ago

Arbitrary inclinations is trivial you just change the heading of your initial pitch maneuver it is all of one number. Some experimentation is needed to get a good mapping for heading to inclination and that will be specific to the craft but that only takes a few launches to get a feel for.

Most of the other things you are pointing out are outside the scope of a gravity turn as any pitch or heading other than surface prograde while in the atmosphere means you are not doing a gravity turn.

1

u/johndcochran 29d ago

And you seem to have completely missed the point. Getting into orbit is easy, assuming you have a lot of delta V available. Getting into orbit efficiently is an entirely different issue. Simply following surface prograde, switching to orbit prograde while keeping the ETA to apoapsis under control by reducing throttle works great for an efficient launch to the East. Doing that gets you into orbit with a circularization burn of less than 50 m/s.

But, using the same profile for a launch to the West doesn't work. You get a high loft trajectory and upon reaching the desired altitude, you need a circularization burn on the order or 500 to 1000 m/s. An entirely different different issue.

So, don't think "I can get into orbit easily, regardless of the desired inclination." when your experience and assumptions are a nice simple 0 degree inclination launch.

1

u/nuggreat 29d ago

I have done what I talked about and had basically zero.chamges to the gravity turn logic in my script and saw basically the same launch efficiency so yes inclination is trivial. And yes that method you describe works just fine for an inclined launch with at least in my experience no where near the costs you describe.

1

u/Admiral_Eversor 29d ago

I think he just wants to wank himself off lol

0

u/JitteryJet 29d ago

Using AI is the point. "real life", what? KSP is a sim.

1

u/Admiral_Eversor 29d ago

Real life, as in not work.

2

u/JitteryJet 29d ago

I do not understand the question. Is the colour blue wrong?

1

u/ShadcnUI_Odi 29d ago

Wha-? Huh?

1

u/JitteryJet 23d ago

You ask a rhetorical question in the OP. Using an LLM is neither right or wrong, it is a choice.

7

u/KinderGameMichi 29d ago

If you are happy with using it, go ahead. If the tools is doing the job you want it to, then it is a right tool for the job. Maybe not the only one, but do what works for you.

4

u/nuggreat 29d ago edited 29d ago

I generally think if you are using an LLM to generate kOS code you have grabbed the wrong mod and should instead be using mechJeb or some other automation mod that more closely matches what you are actually trying to do.

The exception would be if the goal is to learn how to use the LLM and you are simply using KSP and kOS to provide a set of objectives to complete. But even in this case I feel it is a bad choice as most of the problems you would work on in kOS are not applicable to more generalized programing.

1

u/JitteryJet 23d ago

After playing around with an LLM I 100% agree with you.

LLM coding is VERY overrated. It's one of those cases where if you know enough to get the LLM to work in the first place, you don't actually need an LLM. And likely it will be quicker and cheaper to do it manually, those LLMs are expensive.

1

u/Thermodynamicist 29d ago

Most people use higher level languages because assembly isn't friendly or forgiving.

AI is simply another, higher, level of abstraction.

0

u/ShadcnUI_Odi 29d ago

You can’t just repeat the word of our lord and saviour Linus. You must interpret and enhance his texts, as a proof of your worthiness.

0

u/Thermodynamicist 29d ago

I haven't watched LTT for years. Or do you mean the Linux guy?

2

u/ShadcnUI_Odi 29d ago

LTT is fake Linus.

LT is real Linus.

5

u/snakesign Programmer 29d ago

Just use mechjeb at that point.

6

u/johndcochran 29d ago

Heck. Replace MechJeb with kOS scripts. That are more efficient. MechJeb can be best described as a jack of all trades, but master of none. Can it perform a launch? Yep. But, the mod GravityTurn does it more efficiently. Can it dock in space? Yep. But using docking point alignment mod, you can do it far more efficiently. Etc. etc. etc.

2

u/Avocadoflesser 29d ago

nothing morally wrong about it but for most applications you can just use mechjeb, for most people the fun in kos is doing it yourself and learning the algorithms. If it's something that can't be done with mechjeb and you don't feel like programming it yourself feel free

2

u/Still-Ad-3083 29d ago

If you're gonna use LLM, try kRPC instead of kOS.

2

u/Dimencia 29d ago

It's not particularly good at it. I mean, it'll write code that compiles, but it doesn't generalize well or do UI well, and it's very fast to blame your rocket for not having the precise amount of deltaV and TWR that its script works with

So I still enjoy coming up with less terrible approaches and telling it to implement them - it's pretty good at writing the code, as long as you can accurately describe what you want it to write. Don't forget that you can enable your KOS telnet server, and let Codex (or other harness) access it to make sure its scripts can compile, troubleshoot, collect telemetry, do test flights and revert, or etc

1

u/Deranged_Roomba 29d ago

If I just can't figure out why something won't work or can't figure out how to do something I'll pass my code through one (I use perplexity) and see what it says. I feel like the paid AIs are better for code than just Gemini or something. It defeats the purpose to let it do all of it but if it helps me learn then I use it like any other tool. I also use it for stormworks to build controllers when I need help. I do try to learn on my own but sometimes I just want a simple single purpose controller.

1

u/lkn240 4d ago

Older post - but if you are interested in this kind of thing KRPC is probably a better choice.

I've built extremely advanced autopilots (like they can de-orbit, re-enter and land spaceplanes reliably) using AI Agents.

KRPC also has built in interfaces for a lot of popular mods KER, mechjeb) and it's pretty easy to build new plugins.

It supports a variety of standard programming languages (like I use python) which models are already very good at using

1

u/ckow 29d ago

I also think that kos, a fairly well documented but a language no ai system is fine tuned on, is a great example of a system that requires harness engineering to develop durable solutions. If you get good at this, you'll get good at other kinds of AI engineering important in the development world right now.