GTP-4 and coding

Discussion in 'Car Modding' started by BernL, Jan 1, 2023.

  1. BernL

    BernL Registered

    Joined:
    Jun 13, 2016
    Messages:
    11
    Likes Received:
    3
    I hear it writes programs; can it help mods? can one take existing and make it better? Not sure how it works, but from what i did read, might have huge implications here. Cars, tracks, changes, updates? might make the whole process way faster and easier? Has anyone looked at this? Is there a avenue that could be exploited here? I read its open to the public for use?
     
  2. Seven Smiles

    Seven Smiles Registered

    Joined:
    Oct 5, 2010
    Messages:
    1,099
    Likes Received:
    1,152
    I've been experimenting with ChatGPT for software and it does some astonishing things. It relies on enormous amounts of data from (in the case of software) Stack Overflow and the like and I don't think that's around for sim modding.

    A small example: I asked it in C#, create a method that takes a game name, a circuit name and a car name to return a hash and then in C#, create unit tests for GetGameInfoHash

    This is its response
    Code:
    Here is an example of how you might create unit tests for the GetGameInfoHash() method:
    
    using Microsoft.VisualStudio.TestTools.UnitTesting;
    
    namespace MyProject.Tests
    {
        [TestClass]
        public class UnitTests
        {
            [TestMethod]
            public void TestGetGameInfoHash()
            {
                // Test the GetGameInfoHash() method with a variety of inputs
                Assert.AreEqual(GetGameInfoHash("F1 2020", "Monaco", "Mercedes"), -1864537176);
                Assert.AreEqual(GetGameInfoHash("Forza Horizon 4", "The Goliath", "Lamborghini Huracan Performante"), 1469741247);
                Assert.AreEqual(GetGameInfoHash("Gran Turismo Sport", "Nurburgring", "Porsche 911 GT3 RS"), -1084508699);
            }
        }
    }
    The tests would work just as well with dummy ipso lorem text but it "understands" that I am writing software for sim racing and put in realistic text strings.


    Incidentally it's still using GPT-3.5, GPT-4 is expected sometime this year.
     
    Last edited: Jan 1, 2023
  3. Mitch9

    Mitch9 Registered

    Joined:
    Jul 26, 2020
    Messages:
    256
    Likes Received:
    219
    Eh, it might speed up creating the base text files for mods (maybe filling out dozens of veh files for skins?) but i doubt it would be useful for something actually important/sensitive yet, like an hdv file or a sound json.
    Something to keep an eye out for sure.
     
  4. Seven Smiles

    Seven Smiles Registered

    Joined:
    Oct 5, 2010
    Messages:
    1,099
    Likes Received:
    1,152
    You probably need to wait for GPT-5 for that....
     

Share This Page