CA318 practical
- CA318 has one big project.
- Do the project as individuals or in pairs.
- We have been learning JavaScript for the AI algorithms.
- The practical is a fairly open-ended project in JavaScript.
The 2024-25 practical is not yet ready.
The below is last year's practical.
2023-24 project: AI APIs
- For this practical, I want you to explore the world of AI APIs.
- We will look only at APIs that can be called from 3rd party JavaScript,
like the OpenAI APIs
used in the World:
"Chat with GPT model".
- Read and understand the source code of that to get started.
- Research what AI APIs exist.
- Pick one API you like, and construct two Worlds in JavaScript on Ancient Brain:
- A "Hello World" to call the API, to show how it may be called from JavaScript.
- An impressive "use case" of the API, to show its power.
- There is a lot of room for creativity here.
- You may use advanced features of the API, such as providing custom parameters to control
how it works. (Like "temperature" in the OpenAI API.)
- Your user interface can be creative.
e.g. A slider to move "temperature" (or other parameter) up and down
and see how the AI changes.
- Other ideas might include:
Ask the AI for some graphics at run-time
and then include the graphics in your World at run-time.
- Free idea: An idea I thought of at the lab:
User types what graphics they want in a text box.
API fetches the Three.js code to make that graphics.
Your JS runs the code (might need some editing) and the graphics appears in a 3D scene.
So user types "I want 5 blue boxes" and 5 blue boxes appear!
Instructions
- In the Ancient Brain editor, make your Worlds
"Hidden URL"
so other students cannot find them.
- Hand up a short report (about 2 to 5 pages) explaining the project.
- Your report will explain: The research you did, problems encountered,
what is special about the final project,
any experimental results.
- Highlight any functionality that is not obvious.
- Document can have screenshots, snippets of code.
- No need for document to include all your code because I can see your code.
- Submit it to me through this form.
Password will be given out to the class.
Only one submission needed per team.
- Use the form to tell me the URL and API key (if needed).
- Use your proper name (no nicknames) on Ancient Brain, or your work may not be properly credited to you.
Common errors
Two of the most common errors:
- Not crediting things.
Credit the source of any code and other resources that you got from anywhere.
Credit any tutorials used.
By credit I mean give me the URLs!
You will lose a lot of marks if you use anything without crediting the source.
- Not looking at the console.
The console shows JS errors during a run.
It is telling you what the problem is, and probably where to fix it.
The console is your friend!
Fix all console errors before submission.