Doom ACS/DECORATE-AI (NLP Engineering Project) *Zip File!*

Discuss anything ZDoom-related that doesn't fall into one of the other categories.
User avatar
Kontra Kommando
Posts: 954
Joined: Mon Jan 20, 2014 6:46 pm
Location: LV-426

Doom ACS/DECORATE-AI (NLP Engineering Project) *Zip File!*

Post by Kontra Kommando »

Install ChatGPT File Uploader, I use it for the Edge browser.

Once installed, go to start a new chat in ChatGPT.

After the green button to upload the file appears on the screen, upload each file individually. Wait a few minutes between uploads to avoid network errors.

After all four text files are uploaded, the installation process is complete.

You can now start asking it questions regarding modification of Doom with DECORATE and ACS.

Download here:
https://www.mediafire.com/file/oxoqnoz5 ... d.zip/file
Spoiler:
Last edited by Kontra Kommando on Wed May 17, 2023 3:46 am, edited 7 times in total.
User avatar
Kontra Kommando
Posts: 954
Joined: Mon Jan 20, 2014 6:46 pm
Location: LV-426

Re: zdoom-AI?

Post by Kontra Kommando »

I think once plugins allow for ChatGPT Plus to create file structures, and allows you to upload documents like PDF, you could probably create this.

You would just need the data organized and cleaned up correctly.

I wonder if it would be sufficient to take all of the information in the wikis including all of the meta data like tutorials, examples, etc. put it all in a single text file organized clearly.
User avatar
CandiceJoy
Posts: 95
Joined: Thu Jul 13, 2017 3:04 pm
Preferred Pronouns: She/Her
Operating System Version (Optional): Win11, MacOS Ventura
Graphics Processor: Apple M1

Re: zdoom-AI?

Post by CandiceJoy »

ChatGPT is not a substitute for an actual programmer for code you plan on using. It's a great learning tool, though :)
User avatar
Kontra Kommando
Posts: 954
Joined: Mon Jan 20, 2014 6:46 pm
Location: LV-426

Re: zdoom-AI?

Post by Kontra Kommando »

I agree.

But once plugins are available, it may be possible in the future.

I have my eyes on this one particularly:
https://www.youtube.com/watch?v=z5WZhCBRDpU
User avatar
Kinsie
Posts: 7402
Joined: Fri Oct 22, 2004 9:22 am
Graphics Processor: nVidia with Vulkan support
Location: MAP33

Re: zdoom-AI?

Post by Kinsie »

A while back someone jumped onto a Discord asking for help getting some code they "wrote" working correctly and it was an AI generated slurry of DECORATE, ACS and Unity C#. That was very funny and I fully encourage more people to expose themselves like that.
User avatar
Kontra Kommando
Posts: 954
Joined: Mon Jan 20, 2014 6:46 pm
Location: LV-426

Re: zdoom-AI?

Post by Kontra Kommando »

I've endeavored to compile the data from the zdoom wiki to be used as sources for training AI to be an expert at scripting DECORATE for zdoom. I'm also pruning out all of the text that could potentially confuse the AI.

I will share the files with the community once it is completed.

Theoretically, you should just be able to upload it into an AI-software prioritized for coding, and it should work.

I don't any way to test it currently.
User avatar
Caligari87
Admin
Posts: 6190
Joined: Thu Feb 26, 2004 3:02 pm
Preferred Pronouns: He/Him

Re: zdoom-AI?

Post by Caligari87 »

I suppose this all depends on whether you have access to a large-scale AI language model that allows fine-tuning. So far as I'm aware, GPT doesn't allow you to do that yet?

If you're just building a training dataset, then the good news is that there's a LOT of valid code out there. It's just not well-represented on the open internet, which is why GPT currently struggles with this specific task (while doing better at other more well-known languages like C or Python where there's a glut of examples on like, StackExchange). It would probably be good to ask mod authors if you're allowed to use their code, but if they do then chances are you can just feed the entire DECORATE code into the training model.

That said, I think ZScript would be a better choice. It's more programming-language-like, so GPT's inbuilt "knowledge" would help. Also it's more future-proof and flexible, and relies much less on other-language shims (such as how DECORATE is often mixed with ACS). Plus it'd be easier to pre-process as most mods put the majority of their code in a zscript/ folder. If you can "counter-train" the model, then stuff to put in for "bad" data would be other control lumps like MAPINFO or GLDEFS, just so the model doesn't get confused.

8-)
User avatar
Kontra Kommando
Posts: 954
Joined: Mon Jan 20, 2014 6:46 pm
Location: LV-426

Re: zdoom-AI?

Post by Kontra Kommando »

Thank you for all of the tips!

Thus far I have transcribed all of the information for the Action Functions for DECORATE into notepad format, and pruned out all of the text that would confuse the AI. I am currently half-way done with the Doom Classes. I would like to see this out to competition out of the sear curiosity of if it would work.

But I would gladly like to collaborate with anyone that could provide me the raw coding, as that would be optimal for feeding the AI information.

I am currently making individual notepad files curated into dedicated folders, and sub-folders.

I was also considering making a PDF version of all of the files.

Additionally, I was curious as to if putting it all into one file would be better. I could easily combine all of them in adobe acrobat.

I could probably make it in those various formats to test which is best.

I was also thinking if Slade had some guides I could also include.

Maybe if people were willing to contribute their own coding as well as examples for the AI too. This could be a great project for multiple participates.

I also would like to endeavor to do the Zscript version as well. I think it would probably be necessary to separate the zscript files from the DECORATE files, because I could see it confusing the AI. Hopefully, there will be a way to control which folders can be selected to be analyzed.

I also think the Hexen, Heretic, etc. games need to be separated, and be focused specifically on a single game at a time.

I think this would hone the AI's data to yield the best results.
Last edited by Kontra Kommando on Mon Apr 17, 2023 11:03 am, edited 2 times in total.
User avatar
Kontra Kommando
Posts: 954
Joined: Mon Jan 20, 2014 6:46 pm
Location: LV-426

Re: zdoom-AI?

Post by Kontra Kommando »

Once The Code Interpreter Plugin is available for Chat GPT, I am hoping it will be able to do the kind of functions necessary for testing this project. I think we may be able to see if it could analyze these files, and become an expert at coding in DECORATE.


The Code Interpreter Plugin:

The Code Interpreter plugin is a game-changer for both seasoned programmers and coding enthusiasts. It enables ChatGPT to understand and interpret code in a variety of programming languages. This means that users can now simply input code snippets, and the plugin will interpret, debug, or explain the code to them. It’s like having your very own personal coding assistant!

Key Features:

Language Support: The Code Interpreter plugin offers support for multiple programming languages, such as Python, JavaScript, and Java. This broad support ensures that users with diverse coding backgrounds can benefit from its features.
Code Explanation: The plugin helps users understand the functionality of a given code snippet by breaking it down into simpler terms. This is particularly useful for beginners who are still learning the ropes of programming.
Debugging Assistance: Another fantastic feature of the Code Interpreter plugin is its ability to identify errors in your code and offer suggestions for fixing them. This can save a great deal of time and effort, especially for developers working on large projects.
Code Optimization: The plugin also provides guidance on how to optimize your code for better performance and readability. This can be invaluable for seasoned developers seeking to improve their code quality and maintainability.
Real-time Collaboration: The Code Interpreter plugin facilitates real-time collaboration among team members, allowing multiple users to work on the same code simultaneously. This feature can enhance productivity and streamline the development process.

https://ai.plainenglish.io/the-power-of ... 22fe42c15a
User avatar
Kontra Kommando
Posts: 954
Joined: Mon Jan 20, 2014 6:46 pm
Location: LV-426

Re: zdoom-AI?

Post by Kontra Kommando »

Me: could the code interpreter plug in be a good AI to use for a project like this?

Chat GPT4:
A code interpreter plugin could be a useful starting point for a project like this. However, it's important to understand that a code interpreter is designed to read and execute code, while your goal is to create an AI that can understand and generate code related to ZDoom.

To achieve your goal, you may want to consider the following steps:

Choose an AI model suitable for natural language processing and code generation tasks, such as GPT-based models or similar architectures.

Train the chosen AI model with your pruned ZDoom-related programming dataset. This process will require fine-tuning the model to make it more effective at understanding and generating ZDoom-related code.

Develop a plugin or a standalone application that integrates the trained AI model with ZDoom, allowing the AI to interact with the ZDoom engine and provide code generation support.

Test and iterate on your solution to improve its effectiveness and ensure it meets the needs of ZDoom developers.

To conclude, while a code interpreter plugin can be helpful, it's not the best choice for creating an AI that can generate ZDoom-related code. Instead, you should consider using an AI model specifically designed for natural language processing and code generation tasks, and then train it using a curated dataset. Developing a plugin or an application to integrate the AI with ZDoom will be an essential part of the process.
User avatar
Kontra Kommando
Posts: 954
Joined: Mon Jan 20, 2014 6:46 pm
Location: LV-426

Re: zdoom-AI?

Post by Kontra Kommando »

(Bolded is really not necessary, you could just copy and paste it. Ulimately, it is suggesting a natural language processing and code generation tasks, such as GPT-based models that can examine solely the files necessary)

Me: Maybe an AI plugin integrated with Slade prioritized for DECORATE, zscript, etc would make more sense.

Chat GPT4:

Integrating the AI model with SLADE (a Doom map editor) could indeed be a more effective approach if your primary goal is to assist users in creating and editing ZDoom-related content, such as DECORATE scripts, custom monsters, and other game elements.

To integrate the AI with SLADE and prioritize it for DECORATE, ZDoom, and other related components, consider the following steps:

Choose an AI model suitable for natural language processing and code generation tasks, such as GPT-based models or similar architectures.

Train the chosen AI model with your pruned ZDoom-related programming dataset, focusing on DECORATE, ZDoom, and other relevant components.

Develop a plugin or an extension for SLADE that integrates the trained AI model, allowing it to interact with the editor and provide suggestions, auto-completion, and code generation support.

Test and iterate on your solution to improve its effectiveness and ensure it meets the needs of SLADE users working on ZDoom-related content.

By integrating the AI with SLADE, you can offer a more seamless user experience for content creators working on ZDoom projects, as they would be able to access the AI's code generation capabilities directly within the editor they are already using. This could help improve the efficiency of creating and editing ZDoom-related content, making it a valuable addition to the SLADE ecosystem.
User avatar
Kontra Kommando
Posts: 954
Joined: Mon Jan 20, 2014 6:46 pm
Location: LV-426

Re: zdoom-AI?

Post by Kontra Kommando »

I think it would be really interesting to see if including literature in addition to the scripting data, and asking it to create custom character values based on the characters in the literature.

For example, including the Iliad, and asking it to create a custom character similar to Achilles, or Ajax.
User avatar
Kontra Kommando
Posts: 954
Joined: Mon Jan 20, 2014 6:46 pm
Location: LV-426

Re: zdoom-AI?

Post by Kontra Kommando »

Me: If I curated all the pages to look similar to the following. Individually saved as notepad files, would that be optimal for feeding the AI information, by uploading those notepad files?:

Baron of Hell plasma
Actor type: Explosive
Game: Doom
DoomEd Number: None
Class Name: BaronBall
Spawn ID: 154
Identifier:T_BARONBALL
Classes: BaronBall

The green energy projectile fired from a Baron of Hell or a Hell Knight.

DECORATE definition

ACTOR BaronBall
{
Radius 6
Height 16
Speed 15
FastSpeed 20
Damage 8
Projectile
+RANDOMIZE
RenderStyle Add
Alpha 1
SeeSound "baron/attack"
DeathSound "baron/shotx"
Decal "BaronScorch"
States
{
Spawn:
BAL7 AB 4 Bright
Loop
Death:
BAL7 CDE 6 Bright
Stop
}
}


ChatGPT4: Curating and formatting the pages to resemble the example you provided can make it easier for the AI to understand and learn from the data. Saving them as individual plain text files (e.g., Notepad files) can be an acceptable format for feeding the AI information. However, you might need to preprocess the data further to optimize it for training.

Here are some recommendations for preparing the data:

Consistent formatting: Ensure that all the files have a consistent format, using the same structure and terminology. This will help the AI model identify patterns and learn more effectively.

Tokenization: Break down the content into smaller pieces called tokens. These tokens can be words, characters, or other units, depending on the AI model you're using. Tokenization helps the model process the data efficiently.

Encoding: Convert the tokenized text into numerical representations that can be fed into the AI model. This usually involves mapping each token to a unique integer or vector.

Splitting the data: Divide your dataset into training, validation, and test sets. The training set is used to train the AI model, the validation set is used to fine-tune it, and the test set is used to evaluate its performance.

Data augmentation (optional): Generate additional training examples by slightly modifying the existing ones, for example, by rephrasing sentences, changing the order of lines, or introducing synonyms. This can help the AI model generalize better and improve its performance.

Once you have prepared the data, you can feed it into an AI model suitable for natural language processing and code generation tasks, such as a GPT-based model. Remember that the model will need to be fine-tuned using your dataset to become effective at understanding and generating ZDoom-related code.
User avatar
Kontra Kommando
Posts: 954
Joined: Mon Jan 20, 2014 6:46 pm
Location: LV-426

Re: Doom ACS/DECORATE-AI (NLP Engineering Project) *Zip File!*

Post by Kontra Kommando »

Here are the pages from the ACS and Decorate wiki pages copied to notepad; pruned of text that would confuse the AI, and divided into individual pages and folders.

Doom ACS/DECORATE-AI v1.0:

https://www.mediafire.com/file/ewvhuolp ... 0.zip/file

Once a plugin is available that will allow for uploading files on ChatGPT, we can test how it works.
User avatar
Kontra Kommando
Posts: 954
Joined: Mon Jan 20, 2014 6:46 pm
Location: LV-426

Re: Doom ACS/DECORATE-AI (NLP Engineering Project) *Zip File!*

Post by Kontra Kommando »

UPDATE:

Here is a version with all of the 1,298 pages combined into a single PDF:

https://www.mediafire.com/file/1diskbyk ... 0.pdf/file

Return to “General”