Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Starsector 0.97a is out! (02/02/24); New blog post: Anubis-class Cruiser (12/20/24)

Author Topic: ChatGPT understands StarSector's API  (Read 1375 times)

rogerbacon

  • Commander
  • ***
  • Posts: 154
    • View Profile
ChatGPT understands StarSector's API
« on: March 28, 2023, 05:01:36 PM »

Amazing.



Alex may not have to answer so many questions in the future.
Logged

SirHartley

  • Global Moderator
  • Admiral
  • *****
  • Posts: 899
    • View Profile
Re: ChatGPT understands StarSector's API
« Reply #1 on: March 29, 2023, 02:51:35 AM »

ChatGPT like being "Confidently Wrong" on a lot of Starsector specific coding stuff.

While it may be able to help with simple coding tasks that do not require Starsector API methods or implementations, it will start screwing up if you ask for help with more involved things, especially on methods that have little documentation on the forum or internet.
Logged

AtlanticAccent

  • Lieutenant
  • **
  • Posts: 80
    • View Profile
Re: ChatGPT understands StarSector's API
« Reply #2 on: March 29, 2023, 05:06:53 AM »

(Disclaimer, AI hater)

This is also a pretty generalizable video game programming problem. You're asking for a transformation around an entity in a 2D plane - that's a common operation to any video game in 2+ dimensions.
Logged

MajorTheRed

  • Captain
  • ****
  • Posts: 289
    • View Profile
Re: ChatGPT understands StarSector's API
« Reply #3 on: March 29, 2023, 06:02:28 AM »

Funnily enough, on the other end of the modding spectrum where people like me don't understand coding and do mostly tinkering, I would not be able to enter the instructions as you did in ChatGPT!
Logged

Ontheheavens

  • Commander
  • ***
  • Posts: 141
    • View Profile
Re: ChatGPT understands StarSector's API
« Reply #4 on: March 29, 2023, 09:51:55 AM »

Quote
A key thing to understand here is that the question is not, as some have suggested in the comments, whether any AI model can produce correct code. It's whether this one can be trusted to do so. The answer to that question is an unqualified "NO". GPT-3 is a language model. Language models are an essential part of tools like automatic translators; they tell us how probable it is that any given sentence is a valid English (or whatever language) sentence written as a native speaker would1, which lets us favor translations that are idiomatic over ones that just translate individual words without considering how the sentence flows. The systems can be trivially modified to generate text, if instead of looking up the word you have in the probability distribution it provides, you instead select the next word according to that distribution, which is how these chat bots work.

https://meta.stackoverflow.com/questions/421831/temporary-policy-chatgpt-is-banned?cb=1

Long story short: if you hope to substitute actual knowledge and understanding of Java and Starsector API with your new machine overlord, then you are setting yourself up for disappointment, sooner or later. And it's not just about Starsector - when the initial wow-phase is over and you'll try to incorporate it into your everyday workflow, you'll very quickly discover that the thing is not to be trusted, period.

Topic at hand notwithstanding, try to get beyond the basics, and you will get a very coherent and believable answer that falls apart as soon as you scrutinize it. To me it gives off an impression of a glorified search engine bundled with an extremely eloquent bullcrap generator.
Logged
   

basileus

  • Commander
  • ***
  • Posts: 163
    • View Profile
Re: ChatGPT understands StarSector's API
« Reply #5 on: March 29, 2023, 10:27:45 AM »

To assume that a tool like this would evolve to the point that it's capable of writing production value code with a high confidence level, would assume that some very smart and highly paid engineers and tech leads would deliberately create a tool that would deprecate their own jobs.  I suspect the technology will get there right after politicians successfully pass term limit laws.
Logged

Pep

  • Ensign
  • *
  • Posts: 34
    • View Profile
Re: ChatGPT understands StarSector's API
« Reply #6 on: March 29, 2023, 11:03:02 AM »

Eh, like others mentioned, GPT doesn’t actually understand the SS API, but it is good enough to generally put together simple code if you ask it to do xyz utilizing standard Java classes. Maybe in 10-15 years it will be different, but this is tool is only useful to create basic things or helping junior level programmers.
Logged

rogerbacon

  • Commander
  • ***
  • Posts: 154
    • View Profile
Re: ChatGPT understands StarSector's API
« Reply #7 on: March 29, 2023, 11:32:47 AM »

Well, it just created a method using Global.getSettings().getAllShipVariants(). Only problem is that there is no getAllShipVariants(). There is a getAllVariantIds() though, which is what I wanted. Still, even in its mistake it was useful to point me in the right direction.
The good news is that it seems my job (software engineer) will be secure for at least the next five to ten years.  :)
Logged