

Display four rows with four boxes on the screen. Robotics Game Of Life
Display a matrix on the brick screen. Simple and easy. Download and run the program to see how
- #269
- 17 Mar 2016
Display a matrix on the brick screen. Simple and easy. Download and run the program to see how
The task is to find what the best seed is that will live the longest without entering into a loop or without dying. Find it and submit in the tasks section.
Display a matrix with "life" and "dead" cells on the EV3 LEGO Mindstorms brick screen. The program is available. You can see it, change it, modify it and learn from it.
Learn to program the Game of Life on the LEGO Mindstorms brick screen. This would require drawing on the brick screen, using blocks with switches and loops.
All worked as expected, up until know because the robot got lost. This happens when we turn right and the line does not continue to the right. Now the robot must somehow understand that it is "lost" and escape.
The code is already ready. It is attached below the video. Let's see how the program works and what it does and how to use it.
Let's implement a more advanced program for this robot to learn how to use with motors in opposite directions - and this is to implement the Proportional Line Following algorithm.
In the current course we would use a number of languages. Generally we would program the robots in EV3-G, but we would also program them in JavaScript to make the parallel with the JavaScript. The programming would include arrays, switches and loops.
There are a number of tools available online to help you play the game. You just seed the initial conditions and leave the game. Let's look at some of the sites.
We can Turn Right. We can Turn Left. How do we decide which way to go if there are lines both to the left and to the right. Check out the video.
We are programming this strange construction to move in a square. This is a basic task, but it is worth doing for a robot with motors placed in different directions.
Next state in our state machine programming pattern is the "Turn Left" state and the corresponding behaviour.
Motors can be placed in opposite directions... opposite .. directions. Robo-builders might have difficulties imagining it so we have build one. One of the motors facing forward, the other backward. It is interesting how this robot turns.
Next important state is Turn Right with our robot. This happens when we detect a line on the right.
We've detected the gap. It's time to move over it. This is difficult because we have to detect where the line is after the 0.1 meters gap on the line following field.
It's inevitable. While following this gapped line we would reach a gap. The robot must somehow understand that there is a gap and must make a decision on what to do. For detecting the gap we use the Rotation Sensor. Not the most popular, but very convenient in many cases. Check out the video.
The final video from the course. The robot escapes the state where it is lost. This happens if it can not continue in any direction.
We follow a line. We start from the Smooth Proportional Line Following program and modify it a little for this program. We follow the line with the middle sensor attached on port 2.
We extract the Proportional Line Following algorithm into a new block with parameters. This allows us to experiment with the Threshold, Constant Speed and Relaxation Coefficient. You can now easily use the block in you other programs without having to implement it.
We list the number of decisions that the robot is making while following the line. Then, we group them and decide on the number of sensors to be used.
Looking at the field we must first think of a strategy of solving this line following problem. There are rules that the robot must follow and these rules should be programmed in the robot.
We start a course for following a line with crosses and gaps. This is a challenge that one of the users at FLLCasts.com was trying to accomplish and asked us for advice. We present the whole challenge to you step-by-step. But first, let's also see the whole run of the line following algorithm. With this course, we also do an introduction of using State Machine as a programming pattern.
Showing the same run, but from a different angle. This allows you to see more of the way we sensors work and how exactly the robot positions itself.
Collect the humans and clear them from the rocket launching region. This is rather straightforward as a task, but it requires a little bit of thinking if you want to do it without manipulators.
(LEGO humans of course, not real humans :) ). Working on World Robotics Olympiad 2014 elementary challenge. Collecting modules, bringing them together and lifting them. A very funny and interesting competition that we would explore in this and the next video tutorials from the series
Arriving at a final solution. There is still room for improvement on using the Mindstorms Ultrasonic Sensor for aligning to walls, but we hope the whole five videos could give you a good idea of how to start with a problem and reach a solution.
We explore some common mistakes when a program is developed and becomes complex. We then try to remove part of this complexity.