How AdaBots works
Free and Open Source
We believe in giving back to the Free and Open Source communities that helped us put AdaBots together. And, we want to give as many children as possible access to the best learning environment to learn to code. So, we have released the full AdaBots source code for free. If you want to use it, even for commercial purposes, go ahead!
Three parts, one system
We are hard at work building the web based system at adabots.net, where everything is preconfigured and you only need to sign in to your account from any device and start programming right away. In the mean time, you can install AdaBots on your own computer(s) with these instructions.
You will need:
- - A Minetest server
- - A Minetest client
- - A code editor
These three parts can be on the same computer or different ones, and will interact as depicted in the diagram on the left; the minetest client connects to a minetest server which contains a virtual world. This virtual world has AdaBot entities inside which listen to an AdaBots program which you write using a code editor such as NeoVim, VSCode, or AdabotsEditor, and compile using Alire.
A minetest mod
Install our version of minetest hosted on github here, following the instructions in the readme to compile from source on your system. If you are running the client and server on one machine, this will also serve as your client. If not, you may need further instructions on server setup from the minetest wiki.
An Alire library
1. Install Alire; for linux there are prebuilt binaries available
2. Clone the AdaBots_examples repository from github.
3. Open a terminal in AdaBots_examples and run ./build forward and then ./bin/forward
Build will probably take half an hour or so the first time, but only a few seconds for each build after that.
Ready to use!
Inside your minetest world, you should now be able to place a turtle. Switch to creative mode and search for “turtle” in the inventory, then right-click to place it.
Next, right-click on the turtle in the world and click the Play / Pause button to start the bot listening. The light on the back of the bot will turn green, and the first instruction from your terminal in AdaBots_examples should immediately execute. You can use cntrl-C in the terminal to terminate the program if necessary.
If it does not work, check that the IP address and port in the AdaBot interface in minetest correspond to the machine that is running one of the AdaBots_examples. The default port is 7112; Adabots.Create_Turtle accepts an optional parameter to override it. You should also be able to access the program instructions via a browser - it will show just a single instruction, and after fetching it will wait until you visit [host]:[port]/return_value/true or [host]:[port]/return_value/false respectively for boolean functions.
If you are unable to get things connected, please open an issue on github or send us an email.