(redirected from Poet)

[Home]Poets

Robo Home | Changes | Preferences | AllPages

A collection of FemtoBots (and SonnetBots) by PEZ. They got their name from BeerPoet.

Contents

1.1. /Poet
1.2. /HaikuPoet
1.3. /WallsPoet
1.4. /WallsPoetHaiku
1.5. /DroidPoet
1.6. /WallsPoetAS
1.7. Chat

1.1. /Poet

Gun from BeerPoet, drives around without respect to the doings of its enemy.

Download it from: http://www.robocoderepository.com/BotDetail.jsp?id=1718

Poet 0.2 (codesize 61) source:

package pez.femto;
import robocode.*;
import java.awt.geom.Point2D;

// Poet, just for fun
// By Peter Strömberg, http://robowiki.dyndns.org/?PEZ

public class Poet extends AdvancedRobot {

    public void run() {
       turnGunRightRadians(Double.POSITIVE_INFINITY); 
    }

    public void onScannedRobot(ScannedRobotEvent e) {
        setTurnRight(Point2D.Double.distance(400, 300, getX(), getY()) - 150);
        setAhead(100);
        setFire(3);
        setTurnGunLeftRadians(getGunTurnRemainingRadians());
    }
}

1.2. /HaikuPoet

My haiku variant of "stay perpendicular and move back and forth".

Download link: http://www.robocoderepository.com/BotDetail.jsp?id=1730

Source:

package pez.femto;
import robocode.*;

// HaikuPoet, Poetry
// By Peter Strömberg, http://robowiki.dyndns.org/?PEZ

public class HaikuPoet extends AdvancedRobot {
    public void run() { 
        setTurnGunRightRadians(Double.POSITIVE_INFINITY); 
    } 

    public void onScannedRobot(ScannedRobotEvent e) { 
        setTurnRight(e.getBearing() + 80);
        setAhead((setFireBullet(2.1) == null ? 100 : 0) * Math.sin(getTime() / 12)); 
        setTurnGunLeftRadians(getGunTurnRemainingRadians());
    } 
} 

1.3. /WallsPoet

Poetry on walls. Geared for Melee battles against other stupid bots.

Download: http://www.robocoderepository.com/BotDetail.jsp?id=1731

Source:

package pez.femto;
import robocode.*;

// WallsPoet, is this Graffiti?
// By Peter Strömberg, http://robowiki.dyndns.org/?PEZ

public class WallsPoet extends Robot {
    public void run() {
        turnLeft(getHeading() % 90);
        turnGunRight(Double.POSITIVE_INFINITY); 
    }

    public void onScannedRobot(ScannedRobotEvent e) {
        fire(3);
        ahead(200);
    }

    public void onHitWall(HitWallEvent e) {
        turnRight(90);
    }
} 

1.4. /WallsPoetHaiku

A haiku walls bot with some wall avoidance and energy management.

This is a quite strong 1-v-1 FemtoBot which has actually won the RobocodeLittleLeague 1-v-1 femto division a few times and also keeps the current high score there. Some times I update the below list:

Download: http://www.robocoderepository.com/BotDetail.jsp?id=1734

Source

package pez.femto;
import robocode.*;

// By Peter Strömberg, http://robowiki.dyndns.org/?PEZ
// Haiku wall avoidance

public class WallsPoetHaiku extends AdvancedRobot {
    public void run() {
        setTurnGunRight(Double.POSITIVE_INFINITY);
        while (true) {
            ahead(getBattleFieldHeight() - 100);
            setTurnRight(90 - getHeading() % 90); 
        }
    }

    public void onScannedRobot(ScannedRobotEvent e) {
        fire(e.getEnergy() / 4);
    }
} 

1.5. /DroidPoet

A haiku, perceptual, Robot, Droid. Follows Walls and shoots against the center of the battle field.

Here: DroidPoet

1.6. /WallsPoetAS

My first entry in the SpinBotChallenge. Happens to be a HaikuBot at the moment.
package pez.femto;
import robocode.*;

// WallsPoetAS, for the http://robowiki.net/?SpinBotChallenge
// By Peter Stromberg, http://robowiki.net/?PEZ

public class WallsPoetAS extends Robot {
    public void run() {
        turnGunLeft(Double.POSITIVE_INFINITY); 
    }

    public void onScannedRobot(ScannedRobotEvent e) {
        fire(3);
        ahead(150);
    }

    public void onHitWall(HitWallEvent e) {
        turnLeft(getHeading() % 90 - 90);
    }
} 

1.7. Chat


Robo Home | Changes | Preferences | AllPages
Edit text of this page | View other revisions
Last edited June 14, 2005 15:52 EST by PEZ (diff)
Search: