Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Use ChatGPT to automate some code updates  (Read 858 times)

1eb

  • Escaped Lunatic
    • View Profile
Use ChatGPT to automate some code updates
« on: July 10, 2023, 12:58:59 pm »

https://chat.openai.com/

ChatGPT, I'm going to give you three chunks of code. The first is an example before my update. The second is an example after my update. The third is a chunk that I need you to update for me, using the same techniques I applied in the first example.

This goal of this is to work through the interface for every possible action and event.

Chunk 1:
*code before you updated for interface changes*

Chunk 2:
*that same code after you updated for interface changes*

Chunk 3. I need you to update this one for me, please. I want you to give me this updated code without any explanation, and do not include any other code:
*code that you need updated for interface changes*
Logged

LuuBluum

  • Bay Watcher
    • View Profile
Re: Use ChatGPT to automate some code updates
« Reply #1 on: July 10, 2023, 03:20:22 pm »

Been discussed before. None of this works nearly as well as people seem to think it does, and ends up making software development take more time debugging half-functional generated code rather than just solving the problem yourself.
Logged

Tilla

  • Bay Watcher
  • Slam with the best or jam with the rest
    • View Profile
Re: Use ChatGPT to automate some code updates
« Reply #2 on: July 11, 2023, 10:00:43 pm »

ChatGPT would just make things take longer + make development of DF environmentally disastrous (ChatGPT takes a huge amount of electricity and water for data center cooling). It adds nothing
Logged

A_Curious_Cat

  • Bay Watcher
    • View Profile
Re: Use ChatGPT to automate some code updates
« Reply #3 on: July 12, 2023, 02:14:06 am »

I'm surprised (and relieved) that no one has used ChatGPT to write suggestions for the suggestions forum...
Logged
Really hoping somebody puts this in their signature.

Karv

  • Escaped Lunatic
    • View Profile
Re: Use ChatGPT to automate some code updates
« Reply #4 on: July 22, 2023, 12:21:51 pm »

Although ChatGPT can produce small code snippets, it wouldn't be fit for the task of changing large amounts of code, especially with "techniques" not included in the AI's training set. I'll provide a non-code example here.

I'm surprised (and relieved) that no one has used ChatGPT to write suggestions for the suggestions forum...

Quote
K: "Hello deer sir or madam or entity of your free choosing. Do you have a moment to talk about Dorf Fortress?"
ChatGPT: "Greetings, dear interlocutor! I absolutely have a moment to discuss Dwarf Fortress, one of the most captivating and intricate simulation games ever created. [... talks about DF in general]" <I LOVE how they called me interlocutor! xD>
K: "I see you already know more about it. Do you have a suggestion for their game?"
ChatGPT: "As an AI language model, I don't have personal opinions or preferences, but I can offer a suggestion for your Dwarf Fortress gaming experience! [... talks about mods]" <Not the suggestion I wanted, but okay, mods>
K: "Please provide a suggestion that could probably make the game better."
ChatGPT: "Certainly! While Dwarf Fortress is already a remarkable game with a passionate fanbase, there's always room for improvement and new ideas. One suggestion to potentially enhance the game further is to introduce more accessible and customizable user interfaces.

Improved User Interface (UI):

Dwarf Fortress has a notoriously complex and text-based interface, which can be overwhelming for newcomers. An enhanced UI with intuitive menus, tooltips, and graphical elements could make the game more approachable without sacrificing its depth.
Implementing context-sensitive UI elements could help players understand the current state of their fortress and provide relevant information and options at their fingertips.
Customizable Graphics and Themes:

While some players enjoy the ASCII graphics for their retro charm, having built-in support for different graphical tilesets and themes would cater to a wider audience. This would allow players to choose the visual style they prefer, whether it's traditional ASCII, pixel art, or more realistic graphics.
Implementing a theme system could also enable players to customize the game's overall appearance, fonts, and colors, fostering a more personalized gaming experience.
In-Game Tutorials and Guides:

To ease the learning curve, the addition of in-game tutorials and interactive guides would be beneficial. These tutorials could be optional and tailored to different aspects of the game, such as fortress building, resource management, and combat.
Providing helpful hints, pop-up tips, or a comprehensive "New Player's Guide" accessible from the main menu could further assist newcomers in understanding the game's mechanics.
Advanced Modding Support:

Expanding on the existing modding capabilities would empower the community to create even more diverse and engaging content for the game. Robust modding tools and documentation could foster a thriving modding community, bringing fresh ideas and extending the game's longevity.
Enhanced World and Diplomacy Simulation:

Expanding the world simulation aspect by adding deeper diplomacy and politics could create more dynamic interactions between different civilizations. This could lead to more complex wars, alliances, and trade relationships, enriching the overall storytelling experience.
Graphics for the Underworld:

Dwarf Fortress currently represents the underworld as an ASCII maze, but introducing more detailed and atmospheric graphics for this subterranean realm could add another layer of visual interest and excitement.
It's worth noting that the game's uniqueness and complexity are part of its charm, and any changes should be carefully balanced to preserve the essence of what makes Dwarf Fortress special. However, implementing features that improve accessibility and customization can make it more inviting to a broader audience without compromising its intricate simulation and gameplay depth." <Spicy>

ChatGPT suggests things already implemented or suggested somewhere. Things they learned with information gathered up to a certain cutoff-date. That's it. There aren't new suggestions, and nothing above what they had learned. Generating code is more straightforward than suggestions as there is a certain input with an expected result. But code has to be understood. It's like building a house. Yes, they can plan a kitchen - but is it the kitchen you actually need, and how do you explain everything you need to them? Some things sound easy in theory, but in practice it's still the same for every developer: Type, use dark mode (light attracts bugs), pick your tool of choice, dig for bugs that made it into your code, defeat the monsters hidden in strange places, rinse, repeat. Maybe with a few smaller code snippets from tools like ChatGPT (never tried to ask them, but some humans find the output useful). Yeah... it's complicated.
Logged

Ziusudra

  • Bay Watcher
    • View Profile
Logged
Ironblood didn't use an axe because he needed it. He used it to be kind. And right now he wasn't being kind.

A_Curious_Cat

  • Bay Watcher
    • View Profile
Re: Use ChatGPT to automate some code updates
« Reply #6 on: July 23, 2023, 02:06:05 am »

Although ChatGPT can produce small code snippets, it wouldn't be fit for the task of changing large amounts of code, especially with "techniques" not included in the AI's training set. I'll provide a non-code example here.

I'm surprised (and relieved) that no one has used ChatGPT to write suggestions for the suggestions forum...

Quote
K: "Hello deer sir or madam or entity of your free choosing. Do you have a moment to talk about Dorf Fortress?"
ChatGPT: "Greetings, dear interlocutor! I absolutely have a moment to discuss Dwarf Fortress, one of the most captivating and intricate simulation games ever created. [... talks about DF in general]" <I LOVE how they called me interlocutor! xD>
K: "I see you already know more about it. Do you have a suggestion for their game?"
ChatGPT: "As an AI language model, I don't have personal opinions or preferences, but I can offer a suggestion for your Dwarf Fortress gaming experience! [... talks about mods]" <Not the suggestion I wanted, but okay, mods>
K: "Please provide a suggestion that could probably make the game better."
ChatGPT: "Certainly! While Dwarf Fortress is already a remarkable game with a passionate fanbase, there's always room for improvement and new ideas. One suggestion to potentially enhance the game further is to introduce more accessible and customizable user interfaces.

Improved User Interface (UI):

Dwarf Fortress has a notoriously complex and text-based interface, which can be overwhelming for newcomers. An enhanced UI with intuitive menus, tooltips, and graphical elements could make the game more approachable without sacrificing its depth.
Implementing context-sensitive UI elements could help players understand the current state of their fortress and provide relevant information and options at their fingertips.
Customizable Graphics and Themes:

While some players enjoy the ASCII graphics for their retro charm, having built-in support for different graphical tilesets and themes would cater to a wider audience. This would allow players to choose the visual style they prefer, whether it's traditional ASCII, pixel art, or more realistic graphics.
Implementing a theme system could also enable players to customize the game's overall appearance, fonts, and colors, fostering a more personalized gaming experience.
In-Game Tutorials and Guides:

To ease the learning curve, the addition of in-game tutorials and interactive guides would be beneficial. These tutorials could be optional and tailored to different aspects of the game, such as fortress building, resource management, and combat.
Providing helpful hints, pop-up tips, or a comprehensive "New Player's Guide" accessible from the main menu could further assist newcomers in understanding the game's mechanics.
Advanced Modding Support:

Expanding on the existing modding capabilities would empower the community to create even more diverse and engaging content for the game. Robust modding tools and documentation could foster a thriving modding community, bringing fresh ideas and extending the game's longevity.
Enhanced World and Diplomacy Simulation:

Expanding the world simulation aspect by adding deeper diplomacy and politics could create more dynamic interactions between different civilizations. This could lead to more complex wars, alliances, and trade relationships, enriching the overall storytelling experience.
Graphics for the Underworld:

Dwarf Fortress currently represents the underworld as an ASCII maze, but introducing more detailed and atmospheric graphics for this subterranean realm could add another layer of visual interest and excitement.
It's worth noting that the game's uniqueness and complexity are part of its charm, and any changes should be carefully balanced to preserve the essence of what makes Dwarf Fortress special. However, implementing features that improve accessibility and customization can make it more inviting to a broader audience without compromising its intricate simulation and gameplay depth." <Spicy>

ChatGPT suggests things already implemented or suggested somewhere. Things they learned with information gathered up to a certain cutoff-date. That's it. There aren't new suggestions, and nothing above what they had learned. Generating code is more straightforward than suggestions as there is a certain input with an expected result. But code has to be understood. It's like building a house. Yes, they can plan a kitchen - but is it the kitchen you actually need, and how do you explain everything you need to them? Some things sound easy in theory, but in practice it's still the same for every developer: Type, use dark mode (light attracts bugs), pick your tool of choice, dig for bugs that made it into your code, defeat the monsters hidden in strange places, rinse, repeat. Maybe with a few smaller code snippets from tools like ChatGPT (never tried to ask them, but some humans find the output useful). Yeah... it's complicated.

I never said I thought it would be a good idea...
Logged
Really hoping somebody puts this in their signature.