Python library for StarCraft II "An easy-to-use library for writing AI Bots for StarCraft II in Python 3. The ultimate goal is simplicity and ease of use, while still preserving all functionality. A really simple worker rush bot should be no more than twenty lines of code, not two hundred. However, this library intends to … Sigue leyendo 0. StarCraft II Python Bot: Introduction
Etiqueta: 3
1. StarCraft II Python Bot: Gathering resources
Base script import sc2 from sc2 import run_game, maps, Race, Difficulty from sc2.player import Bot, Computer class AlanBot(sc2.BotAI): async def on_step(self, iteration): pass run_game(maps.get("AbyssalReefLE"), [ Bot(Race.Terran, AlanBot()), Computer(Race.Zerg, Difficulty.Hard) ], realtime=True) - Command Center The Command Center is the main building you need. On it you build your workers. You start with one the match and … Sigue leyendo 1. StarCraft II Python Bot: Gathering resources
2. StarCraft II Python Bot: Building units
Everything is an unit.Random Apex Base Script import sc2 from sc2 import run_game, maps, Race, Difficulty from sc2.player import Bot, Computer from sc2.ids.unit_typeid import * class AlanBot(sc2.BotAI): async def on_step(self, iteration): await self.buildWorkers() await self.distribute_workers() await self.buildRefineries() async def buildWorkers(self): for commandcenter in self.units(UnitTypeId.COMMANDCENTER).ready.noqueue: if self.can_afford(UnitTypeId.SCV) and self.workers.amount < self.units(UnitTypeId.COMMANDCENTER).amount * 14 + 4: await … Sigue leyendo 2. StarCraft II Python Bot: Building units
RaspberryPi 3 MiniComputer Day 1
Tras hacer el pedido de una pantalla y una batería de mi anterior post, lo primero que ha llegado ha sido la pantalla. Una pantalla de 5 pulgadas de segunda mano, que aunque aparentemente tiene rayada un poco la pantalla, solo cuenta con estos rayones en el plástico protector y no en la pantalla en … Sigue leyendo RaspberryPi 3 MiniComputer Day 1
RaspberryPi 3 MiniComputer Day 0
Desde hace un tiempo tengo la Raspberry Pi 3 en un cajón. La compré para tener algo parecido a un sobremesa en que solo hacer las cosas básicas, leer el correo, hablar, ver vídeos, etc. Al poco tiempo deje de usarla para ese modo debido a que no cumplía las expectativas de rendimiento que esperaba, … Sigue leyendo RaspberryPi 3 MiniComputer Day 0