⬡ AIR · Leaving Land · Lesson 5 of 5 ⬡
AI ENEMIES IN MAKECODE ARCADE
Give something in your game a mind of its own.
📢 An enemy that sits still is scenery. An enemy that comes after you is a threat. The difference is a short list of rules the computer checks over and over, many times a second, and that is where your game runs into AI.
Open your game
Go to arcade.makecode.com, sign in with Microsoft, and open your ocean game from My Projects.
Open your worksheet
Click the assignment link on this page to open your copy of the worksheet in Google, and follow its steps to add an enemy that reacts to the player.
Tune the difficulty
Playtest until the enemy is hard but beatable. Too fast and nobody wants to play. Too slow and nobody has to try. Then finish the worksheet and turn it in here.
Do not see a worksheet when you open this assignment? Ask your teacher for it before you start.
🧠 Is that really AI?
You have met this idea twice already. In Intro to AI you wrote algorithms for HorizonBot, step-by-step rules a machine follows exactly. In Machine Learning Week you trained a model to sort things it had never seen.
Your enemy is the first kind. It is not thinking about you. It is checking a rule you wrote, over and over, very fast. Most of what people call game AI is exactly that, and knowing the difference is the whole point.
✅ By the end of this lesson:
✓ Added an enemy that reacts to the player
✓ Playtested until it was hard but beatable
✓ Turned in my worksheet
📢 Un enemigo que se queda quieto es decoración. Un enemigo que te persigue es una amenaza. La diferencia es una listita de reglas que la computadora revisa una y otra vez, muchas veces por segundo, y ahí es donde tu juego se topa con la IA.
Abre tu juego
Entra a arcade.makecode.com, inicia sesión con Microsoft y abre tu juego del océano desde My Projects.
Abre tu hoja de trabajo
Haz clic en el enlace de la tarea en esta página para abrir tu copia de la hoja de trabajo en Google y sigue sus pasos para agregar un enemigo que reaccione al jugador.
Ajusta la dificultad
Prueba el juego hasta que el enemigo esté difícil pero vencible. Si va muy rápido, nadie quiere jugar. Si va muy lento, nadie tiene que esforzarse. Luego termina la hoja de trabajo y entrégala aquí.
¿No ves ninguna hoja de trabajo al abrir esta tarea? Pídesela a tu maestra antes de empezar.
🧠 ¿Eso de verdad es IA?
Ya te topaste con esta idea dos veces. En Intro to AI escribiste algoritmos para HorizonBot, reglas paso a paso que la máquina sigue tal cual. En Machine Learning Week entrenaste un modelo para clasificar cosas que nunca había visto.
Tu enemigo es del primer tipo. No está pensando en ti. Está revisando una regla que tú escribiste, una y otra vez, muy rápido. Casi todo lo que la gente llama IA de videojuegos es exactamente eso, y saber la diferencia es justo de lo que se trata.
✅ Al final de esta lección:
✓ Agregué un enemigo que reacciona al jugador
✓ Probé el juego hasta que quedó difícil pero vencible
✓ Entregué mi hoja de trabajo