Introduction
Coding and artificial intelligence are becoming pivotal to the design practice. Furthermore, it might also be argued that Information Technology is unavoidable in any field. resisting change is futile, the real question becomes: how do we embrace it? In this project we will delve into this topic, particularly on creative coding and generative artificial intelligence, using p5.js paired with the DeepSeek's chatbot as a coding aid. Additionally, you will be introduced to some basics of machine learning concepts, in order to spread awareness and knowledge.
The choice of p5.js was done because it's open-source, accessible, and can run directly in the browser without the need for downloads. Similarly, DeepSeek is open-source and it's also proved to be better in code writing than some closed-source competitors.
The interesting thing about this process is that you can merge classic algorithms and machine learning ones, allowing you to get interesting e powerful results even with little knowledge of the technologies, even though a strong algorithmic thinking approach is still recommended. But let's take a step back, what even is an algorithm?
Algorithms
Simply put, an algorithm is a set of rigorous instructions to be followed in problem solving. In our case, the problem is usually the display of a graphic or, for example, how to manage a specific interaction. They also are the very foundation of machine learning, which is a way for computers to learn from given data and improve overtime without needing specific programming for every task. For a more specific explanation you can check the Integrating AI section.
A very common example for basic algorithmic thinking is the recipe example: when cooking a new recipe we follow specific instructions and steps, and if we follow them perfectly we end up getting a delicious perfect dish. In a similar way, algorithms are instructions we give to the computer in order to perform specific task and obtain specific results.
It can be sunderstood by taking the example of cooking a new recipe. To cook a new recipe, one reads the instructions and steps and executes them one by one, in the given sequence. The result thus obtained is the new dish is cooked perfectly. Every time you use your phone, computer, laptop, or calculator you are using Algorithms. Similarly, algorithms help to do a task in programming to get the expected output. When it comes to programming, even in our relatively simple applications we need to develop algorithmic thinking, which means being able to think in a systematic and structured way, just as we need to do when programming or solving problems. To do so, there are many different approaches that are quite useful: for example decomposition, which envolves breaking down a problem into smaller and thus more manageable parts, but also pattern recognition, which means trying to identify trends within a problem in order to make it easier to solve it. Finally, we will need to develop a series of ordered steps to solve the problem.
Merging Generative AI and Computational Graphics
So, what are we actually going to do and how is it going to be structured? Once we will have learned the basics of p5.js programming we will then see some basics of the technical background of artificial intelligence, in order to then use text-to-text models with a deeper understanding of these technologies. Through this kind of models we will see how to obtain programs that go beyond our capabilities or just to be more efficient.