Better Programming

Advice for programmers.

Follow publication

Member-only story

Exploring the Intersection of AI and Physics: The Role of ChatGPT in Code Generation

Callum Bruce
Better Programming
Published in
14 min readMar 13, 2023

Not a Medium member? Access this article for free here.

Imagine a world where machines can generate code to solve complex problems in the physical world around us. ChatGPT, a type of Natural Language Processor (NLP) which writes human-like responses from user input prompts can do just that.

In this article, I am going to show you how. Right now, anyone can use the research release of ChatGPT — you just need to head over to OpenAIs website and sign up for an account to try it.

A lot is going on under the hood of ChatGPT and I am not going to attempt to explain it here (OpenAI gives a detailed overview of how the technology works on its website).

Instead, I am going to work through a series of examples of solving physics-based problems, each with increasing complexity. By the end, you should have a good feeling of the strengths and weaknesses of ChatGPT when applied to this kind of problem.

Motivation

Before diving into examples, a good place to start is to ask why we should be interested in using AI to write code like this. Being someone who has spent most of their career working in the Computer Aided Engineering (CAE) software industry I believe this can be a massively disruptive application for emerging AI technologies.

According to Fortune Business Insights, the global CAE engineering market size is projected to grow from USD 6.25 billion to USD 12.16 billion by 2029. CAE is used in the development lifecycle of so many products and processes it is hard to overstate the value that CAE software products deliver, often indirectly, to so many people around the world every single day. Anywhere in a product or process where there is some sort of structural, dynamic, fluid, thermal or electromagnetic environment that needs to be understood or optimized, there has likely been some form of CAE used in its development. Aircraft, automobiles and personal electronic devices are all products that apply CAE in their development. Processing of mined ores, injection moulding…

Callum Bruce
Callum Bruce

Written by Callum Bruce

Chartered Engineer | Working in software engineering | Writing about my side projects | www.linkedin.com/in/callumbruce

Responses (2)

Write a response