Archivo etiqueta education

Programmable Minecraft: dynamic code execution using Groovy

If we think about the road to transit to achieve our goal, we would notice that, eventually, we’d have to face the problem of Java not being an interpreted language, which makes the task of modifying code dynamically a bit more difficult. There are many workarounds to this issue and today I’d like to talk you about one of them: integrating Groovy and Java.

Groovy is a dynamic programming language for the Java platform: it is dynamically compiled to Java Virtual Machine bytecodes which allows us to alter the functioning of our code on the fly and to integrate it into Java application with ease.

The Groovy documentation clearly explains the integration mechanism and even provides example code: integrating scripts into the Minecraft source code makes changing the game’s behaviour during its execution easy 🙂 (click on the image to enlarge it)

Si pensamos respecto al camino a transitar para llevar a cabo el proyecto de Minecraft Programable, notaríamos que, en alguna parte del mismo nos encontraríamos con el problema de que Java no es un lenguaje interpretado, lo que dificulta la tarea de cambiar el código de nuestra aplicación y ver los resultados de nuestros cambios instantáneamente. Existen diferentes «soluciones» a esto y hoy quiero hablarles respecto a una de ellas: integrar Java y Groovy.

Groovy es un lenguaje de programación dinámico para la plataforma Java: es compilado dinámicamente a bytecodes de la máquina virtual de Java lo que nos permite alterar el funcionamiento de nuestro código on the fly e integrarlo en aplicaciones Java con facilidad.

La documentación de Groovy explica con bastante claridad el mecanismo para hacer esto e incluso nos provee de código ejemplo: integrar scripts en el código de Minecraft nos permite modificar el código que queramos durante la ejecución del juego 🙂 (click en la imagen para verla en mayor tamaño)

Groovy and Java

, , , ,

No hay Comentarios

Programmable Minecraft: Experimenting with the mob’s AI

Hello everyone! I bring you another status update of the Programmable Minecraft project.

Following the line of work I shared with you in my previous post on the topic, we incorporated new means of interacting with Minecraft: now users can ask about a particular block using its position as reference, ask about their own position, place living entities (mobs) in the world and disable their AI in order to code their own. Here’s a tiny example:

Have fun!

Hola a todos! Les traigo otro informe del estado del proyecto Minecraft Programable.

Siguiendo la línea de trabajo que compartí con ustedes en mi post anterior, incorporamos nuevas formas de interactuar con Minecraft: ahora los usuarios pueden consultar información respecto a un bloque particular utilizando su posición como referencia, colocar entidades (mobs) en el mundo y deshabilitar su IA para programar la suya propia. Este es un pequeño ejemplo:

Que se diviertan!

, , ,

2 Comentarios

Robotics as a way of getting students closer to mathematical thinking

Today I’d like to share with you a fragment of «A Mathematician’s Lament», by Paul Lockhart.

So how do we teach our students to do mathematics? By choosing engaging and natural problems suitable to their tastes, personalities, and level of experience. By giving them time to make discoveries and formulate conjectures. By helping them to refine their arguments and creating an atmosphere of healthy and vibrant mathematical criticism. By being flexible and open to sudden changes in direction to which their curiosity may lead. In short, by having an honest intellectual relationship with our students and our subject.

I think this post’s title and the cited fragment speak by themselves.

You can read the full piece here.

Hoy me gustaría compartir con ustedes un fragmento de «El lamento de un matemático», escrito por Paul Lockhart.

De modo que ¿cómo deberíamos enseñar matemáticas a nuestros estudiantes? Escogiendo problemas naturales e interesantes, que vayan con sus gustos, personalidades y nivel de experiencia. Dándoles tiempo para hacer descubrimientos y formular conjeturas. Ayudándoles a refinar sus argumentos y creando una atmósfera de crítica matemática sana y saludable. Siendo flexibles y abiertos a cambios súbitos en la dirección a la que apunte su curiosidad. En resumen, manteniendo una relación intelectual honesta con nuestros estudiantes y las matemáticas.

Creo que el título de este post, en conjunto con el fragmento citado, hablan por sí solos.

Pueden leer la pieza entera acá

.

, , , , , , ,

1 Comentario

Programmable Minecraft: coding at runtime

Hello everyone! The Programmable Minecraft project is progressively growing and I’d like to share its current status with you today.

We polished the interaction mechanisms we had designed earlier, so we could begin to «expose» the code involved. Users can now carry out a few basic tasks (such as placing a block of a specific kind on a determinate position of the world). While only a very reduced number of interactions have been incorporated into the project until now, the number of applications these have is huge.

An example of application is the generation of structures of enourmous size and complexity. What would manually take days (or even weeks) can be achieved through simple algorithms in a few minutes.

Here are a few screenshots of some structures we’ve been generating to test the project:

Sierpinski Triangle

Dragon Curve

Archimedean Spiral

¡Hola a todos! El proyecto de Minecraft Programable avanza poco a poco, y vengo a compartirles su estado actual:

Puliendo un poco los mecanismos de interacción desarrollados inicialmente, comenzamos a «exponer» el código útil para dicha interacción. Ahora es posible para los usuarios realizar algunas acciones básicas mediante código (como colocar un bloque en una determinada posición del mundo). Si bien se ha incorporado un número muy pequeño de interacciones, los resultados alcanzables mediante ellas son prácticamente ilimitados.

Aquí hay algunos screenshots de las estructuras que hemos generado para probar al proyecto:

Sierpinski Triangle

Dragon Curve

Archimedean Spiral

, , ,

No hay Comentarios

Programmable Minecraft: first steps

¡Hola a todos! Hoy les traigo noticias respecto a Minecraft «programable».

Primeramente, una pequeña presentación del proyecto: Lo que se busca exactamente es la automatización de algunas acciones que los jugadores realizan con frecuencia y suelen ser tediosas (como la construcción de estructuras sencillas de gran tamaño o la adquisición de una cantidad considerable de bloques de un material facilmente accesible). Esta automatización ha de ser posible mediante la ejecución de código escrito por el jugador. Aprovechando las características de Smalltalk (especialmente el que nos brinda la posibilidad de modificar el comportamiento de los objetos durante la ejecución de nuestros programas), procuramos que la «digestión» del código del usuario sea llevada a cabo por Smalltalk, enviandose las instrucciones más sencillas posibles a Minecraft.

Teniendo esto en cuenta, el primer paso es establecer una conexión entre Smalltalk y Minecraft, que es lo que les muestro en este post. Contamos con una interfaz gráfica muy sencilla que, por el momento, nos muestra información en vivo acerca de nuestras acciones en el juego. Aún queda un largo camino por recorrer pero ya estamos algo más cerca de la meta que antes 🙂

Morph del inspector al 26/06/2014

Hello everyone! Today I bring you news regarding the Programmable Minecraft project.

First of all, a little introduction: what we are looking for is the automation of different actions that players frequently carry out and tend to be tedious (such as constructing simple structures of considerable size or acquiring a considerable amount of blocks of a common material). This automation is to be made possible through the execution of code written by the player. Taking advantage of Smalltalk’s unique characteristics (specially that it allows us to modify the behaviour of objects during execution), we seek that the «digestion» of the aforementioned code is carried on by the Smalltalk VM, being what is sent to Minecraft the simplest instruction set possible.

With this in mind, the first step is to establish a connection between Minecraft and Smalltalk, which is what I show you in this post. We made a very simple graphic interface that currently displays live information related to our actions inside the game. There is still a long way to go, but we’re now a bit closer to the goal than we were before 🙂

Morph del inspector al 26/06/2014

, , ,

No hay Comentarios

Playing & programming Sphero

Hi everybody! Hope you are well 🙂 The goal of this post is to tell you that we’ve been playing with the Orbotix’s ball called Sphero and we’ve spent a good time. So we’ve decided to add it to Physical Etoys. We can change its colors, stabilize it, read its sensors and make scripts to move it. We’ve uploaded a short but cool video because we do not have much time to film.

You can download the Sphero .pem to play with Physical Etoys here.

Hope you like it. Have fun!


¡Hola a todos! Espero que anden bien 🙂 Este post es para decirles que estuvimos jugando con la pelota Sphero de Orbotix y realmente nos gustó. Entonces decidimos agregarla a Physical Etoys. Podemos cambiarle su color, estabilizarla, leer sus sensores y realizar guiones para que se mueva. Les dejamos un video corto pero copado ya que no tenemos mucho tiempo para filmar. Esperamos que les guste. Que se diviertan!

Pueden bajar el .pem de Sphero para jugar con Physical Etoys aquí.

Esperamos que les guste. Que se diviertan!

, , , , ,

7 Comentarios