AdaBots

所属分类:人工智能/神经网络/深度学习
开发工具:Ada
文件大小:0KB
下载次数:0
上传日期:2023-08-02 16:31:06
上 传 者sh-1993
说明:  通过编程Minecraft机器人来学习Ada!,
(Learn Ada by programming Minecraft robots!,)

文件列表:
.vimspector.json (260, 2023-08-03)
LICENSE.txt (1079, 2023-08-03)
Makefile (16, 2023-08-03)
adabots.gpr (2428, 2023-08-03)
alire.toml (418, 2023-08-03)
demo/ (0, 2023-08-03)
demo/build_wall_program.png (54839, 2023-08-03)
demo/small_gif.gif (925267, 2023-08-03)
docs/ (0, 2023-08-03)
docs/editor_screenshots/ (0, 2023-08-03)
docs/editor_screenshots/abe.png (91450, 2023-08-03)
docs/editor_screenshots/gitpod.png (134984, 2023-08-03)
docs/editor_screenshots/neovim.png (132575, 2023-08-03)
docs/editor_screenshots/vscode.png (165105, 2023-08-03)
docs/ide.md (2416, 2023-08-03)
docs/minecraft_installation.md (4171, 2023-08-03)
docs/minetest_get_turtle.png (16543, 2023-08-03)
docs/minetest_installation.md (1450, 2023-08-03)
lua/ (0, 2023-08-03)
lua/listen.lua (1091, 2023-08-03)
src/ (0, 2023-08-03)
src/adabots.adb (15361, 2023-08-03)
src/adabots.ads (5975, 2023-08-03)
src/adabots_exceptions.ads (87, 2023-08-03)
src/adabots_lua_dispatcher.adb (1759, 2023-08-03)
src/adabots_lua_dispatcher.ads (703, 2023-08-03)
src/adabots_nodetypes.adb (994, 2023-08-03)
src/adabots_nodetypes.ads (77556, 2023-08-03)

# Learn Ada with programmable bots! Program Text | Demo :-------------------------:|:-------------------------: ![](https://github.com/TamaMcGlinn/AdaBots/blob/master/demo/build_wall_program.png) | ![](https://github.com/TamaMcGlinn/AdaBots/blob/master/demo/small_gif.gif) The computercraft mod for Minecraft adds programmable robots called turtles, which can move around, dig tunnels, build walls and interact with anything in-game. AdaBots helps to teach children and adults alike the Ada programming language. If your child cannot read yet, I recommend you start him / her on [DoBots](https://github.com/TamaMcGlinn/AdaBots/blob/master/http://github.com/TamaMcGlinn/DoBots) first. It is possible to use the small terminal window in-game and the built-in scripting language Lua to write programs, but I wanted to make this easier. This is a standalone program you can run on your computer locally, outside of minecraft, which issues commands to the in-game turtles. This means you can use a real programming environment, with code-completion, a debugger, static-analysis and even mathematical proofs of program correctness using SPARK. ## Why Ada? Ada is a very safe, easy to learn language. It was designed from the ground up to be easy to understand and difficult to make mistakes in. It is case-insensitive, disallows assignment inside conditional statements, has explicit `end if;`, `end loop;` etc. instead of the popular but confusing `}` in most programming languages, disallows all implicit type conversions (which also makes it possible to overload on return type), and even makes multithreading easy with its simple tasking and rendez-vous idiom. Since you can create tasks and multiple turtles in a single program, you could explain these concepts intuitively using AdaBots. In addition, the Ada compiler is an unusually helpful one, saying things like: ``` lovelace.adb:10:04: warning: variable "Blocks" is never read and never assigned lovelace.adb:20:30: error: "Dat" is undefined lovelace.adb:20:30: error: possible misspelling of "Data" ``` # Getting started You will need: - A minecraft or minetest installation - An Ada development environment ## Minecraft / Minetest install instructions You can use either Minecraft or Minetest to run a commandlistener for AdaBots programs. I recommend using Minecraft for this; either connect to a server with ComputerCraft already installed, or [install Adabots in single-player](https://github.com/TamaMcGlinn/AdaBots/blob/master/docs/minecraft_installation.md). Currently, the minetest implementation is early Work-In-Progress; movement, digging and block placement works, but expect bugs. [Minetest installation instructions here](https://github.com/TamaMcGlinn/AdaBots/blob/master/docs/minetest_installation.md). ## Ada environment For Ada programming, you will need to install: - An Ada compiler ([run the installer for your platform here](https://github.com/TamaMcGlinn/AdaBots/blob/master/https://www.adacore.com/download)) - An IDE ([details here](https://github.com/TamaMcGlinn/AdaBots/blob/master/docs/ide.md)) - [Alire (alr)](https://github.com/TamaMcGlinn/AdaBots/blob/master/https://alire.ada.dev/) Clone the [AdaBots_examples repo](https://github.com/TamaMcGlinn/AdaBots/blob/master/https://github.com/TamaMcGlinn/adabots_examples) to have a project up and running quickly. Just open adabots_examples.gpr and src/build_wall.adb in your IDE. ### Compile & Run Open a terminal and issue `make`. It should be around ten minutes the first time, but should only take seconds afterwards. To start the program, run `./bin/[program_name]` in a terminal. Assuming listen is already running on a minecraft turtle, or `turtle:listen()` on a minetest turtle, it should start moving. ## What to do? Now that everything is working, you need something to do. If you are on your own, set yourself some goals: - build a staircase down (3 blocks tall, so you can follow!), and then - a cavern of 10 x 10, 3 blocks tall Or, on the surface, build yourself a house, a tower, or a castle. The sky and bedrock are the limits! ### Ada basics To teach (children) using AdaBots, you need at least a basic understanding of programming (not necessarily with Ada). I recommend the AdaCore [Introduction to Ada](https://github.com/TamaMcGlinn/AdaBots/blob/master/https://learn.adacore.com/courses/intro-to-ada/) (html / pdf) as a course syllabus. Next, you need to stay one lesson ahead of your pupils by experimenting yourself first. ### Read the example programs There is a collection of example programs [here](https://github.com/TamaMcGlinn/AdaBots/blob/master/https://github.com/TamaMcGlinn/AdaBots_examples). I recommend you use them as a starting point for using AdaBots.

近期下载者

相关文件


收藏者