Slashdot Mirror


A Programming Language For Self-Organizing Swarms of Drones

New submitter jumpjoe writes: Drones are becoming a staple of everyday news. Drone swarms are the natural extension of the drone concept for applications such as search and rescue, mapping, and agricultural and industrial monitoring. A new programming language, compiler, and virtual machine were recently introduced to specify the behaviour of an entire swarm with a single program. This programming language, called Buzz, allows for self-organizing behaviour to accomplish complex tasks with simple program. Details on the language and examples are available here. Full disclosure: I am one of the authors of the paper.

6 of 56 comments (clear)

  1. Puzzling Paper by prefec2 · · Score: 3, Insightful

    I wonder, why you constructed that language as an external language, while for the most part it is just C like. And then you did not use flex and bison to construct scanner and parser of the language or any LL parser generator. This makes the whole language developing stuff cumbersome. You did not provide any definition in the paper or your site on the grammar used (I did not find any BNF-like grammar notation). And your semantics are vague. Furthermore, it is not very clever to allow unknown symbols. While lazy loading and other mechanisms are often seen as a convenient thing by programmers (at first), they later have to pay the price and debug like hell. Especially in flying or driving robots, you do not want to have faulty code on the machine. Therefore, you should ensure that all symbols are available with their complete signature.

    BTW: Most people would have developed this with any of the DSL development tools in existence, e.g., flex/bison+emacs (if you are from the 1990s), Xtext, MPS, Spoofax etc. and generated C code which would subsequently compiled to machine code of the specific platform. That would allow to support multiple platforms and you could use the optimization capabilities of the compiler.

    1. Re:Puzzling Paper by ilpincy · · Score: 5, Informative

      I'm the lead researcher in this project. Thanks for your questions! I'll try to address all of them.

      Q. Why an external language?
      A. Robot swarms are a special kind of system. It's not just a collection of computers (like a network would be), but a collections of autonomous devices that occupy space and form networks with very volatile topology. Sure one could use C/C++/Java/Python to program them, but it gets fast very complex, due to the large number of interactions among robots. We believe that it's much better to have a language that natively provides you with the right kind of abstraction, and hides whatever is not necessary for swarm-level coordination.

      Q. It looks like C.
      A. It's directly inspired by JavaScript and Lua, which in turn look like C. We wanted this, so people can get productive faster and don't need to learn a whole new syntax from scratch. The entire point of our effort is to make something people would want to use.

      Q. Why not flex/bison/LL parser ecc.
      A. No specific reason. These are just development tools - we could have used Lemon, we found it easier and more fun to make our own thing. The fact that the VM is custom is a necessary feature - it weighs only 12KB, and this means that we can put it on very resource-limited robots.

      Q. There's no BNF available.
      A. I'll publish it, it's just not on the website yet. We just went public, there's lots of work to still. Good suggestion!

      Q. Semantics are vague.
      A. That means the paper was not written clearly enough. If you have more precise feedback on this, I'd be happy to hear you.

      Q. Unknown symbols are cumbersome and potentially confusing.
      A. I see your point, and I agree. I am currently working on a way to make the debugger aware of this issue, because I think that having robot-specific symbols is an interesting idea. You raise a good point, though.

      Once more, thanks for your feedback!

  2. I don't get it. At all. by Rei · · Score: 3, Interesting

    Why did you create a brand new programming language rather than just a library? I looked at the examples and I don't see any functionality in there that can't just as easily be accomplished with current programming languages and a simple library.

    --
    "You see, Government is a system that is based on weapons." -- Timster
    1. Re:I don't get it. At all. by ilpincy · · Score: 5, Informative

      I'm the lead researcher on this project. Thanks for your question!

      We gave your concern quite a bit of thought.

      In brief, we found no language with the features we wanted that would fit <16KB or <32KB. We wanted a dynamic language with closures, with a VM powerful enough to work in a networked environment with highly volatile topology, and that would be easy to modify to accomodate features such as swarm management and virtual stigmergy. We considered Python and Lua at first, but Python is just too complex to fit the requirements (I studied TinyPy for a week, and it's too limited) and Lua VM makes it hard to fit networking the way we wanted it.

      In the end, we thought that a dedicated language with the right features might be a good choice. After all, Python does nothing C++ doesn't do - but the level of abstraction that Python offers makes developers way more productive. With Buzz, we hope to offer a tool that makes people more productive when the problem is coordinating hundreds of robots. There's obviously lots of work to do towards this goal, and the current implementation of Buzz is just a step in that direction.

  3. I know ! I know, by Archangel+Michael · · Score: 4, Funny

    We should create a whole OS that controls Drone Swarms ....

    We'll call it ...

    BeeOS!

    --
    Agent K: A *person* is smart. People are dumb, stupid, panicky animals, and you know it.
    1. Re:I know ! I know, by halivar · · Score: 4, Funny

      It would be pretty hard to debug, would it not?