A JavaScript "World" used in teaching an AI course.
This World illustrates the "A star" algorithm in AI. It sets up a random maze and finds the shortest path through the maze.
Reload for a new maze.
Users can clone this and edit their copy, and make changes to the problem and the algorithm to explore AI concepts.
See full explanation.
Click to run World: A star at Ancient Brain.
"One Cube World", the World used in the
Ancient Brain Starter Tutorial.
Users who are learning to code can edit this, add textures, make multiple cubes, change rotation, and so on - all in the browser.
Click to run World: One Cube World (P5) at Ancient Brain.
Demo of 3d model.
Click to run World: Car models with light reflection at Ancient Brain.
Open in new window ("Open window") to see full menu for this World.
In the menu, you can change car models and switch skin. ("Chrome" is nice.)
Demo of World with physics.
Click to run World: Collision World at Ancient Brain.
Mouse drag to move camera,
and scroll to zoom camera.
Demo of 3d model.
Drag to rotate. Scroll to zoom. Click to throw paint.
Click to run World: webgl decals at Ancient Brain.
Project: Make a teaching course for schools and colleges
We believe
Ancient Brain can be used in teaching coding in schools and colleges.
What it needs is someone to write a course or textbook.
But they are not yet using the site's full potential.
Ideas for courses:
Coding for kids,
making specific use of Ancient Brain features,
and using kid-friendly language.
Coding for 1st year undergrads.
Coding JavaScript with advanced Three.js graphics. Aimed at established programmers.
A course in Physics.
A course in Mathematics.
A course in Astronomy.
Ideas for how to do it:
Teach concepts visually using 3D graphics and physics.
Teach sorting numbers and strings
by sorting actual 3D blocks. And so on.
Use the
Teaching support.
This has built-in class obfuscation and hidden URLs to stop copying.
Teacher can edit student code and make changes to see what happens.
Find a way to keep students away from the JS console:
JavaScript displays errors in the JS console.
For learners, the JS console is confusing.
Your Worlds could trap console error messages and display them on screen in the World in a floating box or something.
Or a "black cube of death" descends from the sky with the console error message on it.
You could automate the porting.
Which leads to the following project.
Project: Generalised JS porter
Program to generalise porting.
Port any JavaScript anywhere to Ancient Brain.
Other JavaScript will typically needs edits in order to port it to a different site.
Typical edits needed:
All libraries and assets need to be uploaded to Ancient Brain. (This is the Web single-origin policy.)
All paths to libraries and assets need to be fixed.
Sometimes paths need to be fixed inside secondary libraries.
Ancient Brain does everything in JS. No CSS or HTML panels.
So to include a CSS file you need to use:
Touch object plus touch camera, in same World. How?
Touch in a special section at the top (a special div) moves the camera.
Touch in rest of canvas moves agent (or some other action).
So can have 3D World with touch. Adjust camera. Then take actions.
Radu Mariescu-Istodor
has made a complex scrolling traffic JS World with cars and buildings.
See his youtube.
Could try to port this JS World to Ancient Brain.