FightCodeGame ?

From RoboWiki
Jump to: navigation, search

Cool, thanks for the info MN. It's worth noting this game is really young - the first version was built from scratch in a month for a GitHub hacking contest near the end of 2012. They also replied to me on Twitter that some new stuff is coming: "we have some feats in the oven for advanced bots: independent queues for radar, cannon and tank; data storage for machine learning"

I'm curious to see how it does. The whole web-ness and feel of it all really impresses me, and I could see a lot of people trying it that wouldn't have bothered to download Robocode. But at the same time, being stuck with the web interface for all your running and testing and unstable rankings might make it hard to retain power users and maintain a passionate community. Support for local and batch battles would be nice, though it wouldn't be my top priority (yet) as a dev either. It also seems like the gameplay needs some work to approach the depth of Robocode, but it sounds like they're working on that.

Voidious16:12, 21 January 2013

What bothered me most was the missed scans, making Walls a lot weaker than it is in Robocode. Feels like bot width is only 1 pixel wide, but didn´t check the engine to be sure.

And FightCode web design is far superior to what RoboRumble is today. Robocode could copy that by having an applet version.

MN19:08, 21 January 2013
 

I dunno, with the recent Java security issues, I consider Java in the browser pretty much dead.

Voidious19:09, 21 January 2013
 

I did a bit of tweaking on walls to improve it specifically for FightCode (clone and invisible). I also made a copy of spinbot.

http://fightcodegame.com/profile/Chase-san/

Chase21:11, 21 January 2013
 

Boo :)

Miked080107:12, 23 January 2013

You do not have permission to edit this page, for the following reason:

The action you have requested is limited to users in the group: Users.


You can view and copy the source of this page:

Return to Thread:Talk:Main Page/FightCodeGame ?/reply (14).

 

Thanks! I have uncovered may of Doctor Bob's secrets. You can nearly 100% him if you watch energy drops and reverse direction at around 120 distance. Then just aim a little behind him.

Miked080103:06, 19 March 2013

I meant the secrets of how successful it is, not how to beat it. I am trying my hand at nanomelee, but I haven't had much success. (My robot TestMelee is a really crappy derivative of Infinity.) DoctorBob says it has NanoAndrew's movement, but it looks like there must be a little something more. I wondered if you had ever seen DB's code, or heard something from the author.

Sheldor11:22, 19 March 2013
 

His code cannot be completely decompiled as he obfiscated it, but if you look around a bit, there are ways of figuring out what he did. Honestly, you can reverse engineer his good pretty easily by the fact that he cannot hit stop and go targets. His radar is lock onto nearest person and charge - which against weaker melee guns and movement works great. The bots that hide in the corner and make small movements counter him well though. Dustbunny does well because it runs from him (and everyone else) :)

Miked080123:27, 19 March 2013

What about reversing or not reversing directions when the enemy fires? It seems like DB's pattern is a lot more complex than reversing every other shot.

Sheldor02:21, 20 March 2013
 
 
 

Hey there Miked. You have interest in fightcodegame?

Chase08:35, 23 January 2013
 

These guys should be paying me a commission... :-) Welcome back Miked!

Voidious15:00, 23 January 2013
 

And work. Thanks for the good words! I am still attempting to get caught up with a new job and such. I do intend to keep track of things a bit better though going forward and maybe even update things as time allows.

Miked080103:05, 19 March 2013

I have a nano project that is currently stalled due to issues with my installation of Robocode, but looks very promising. It has three modes of movement, two of them reacting to enemy fire, and a PM gun.

The only problem is, I can't store .5 as a char, it gets rounded down to 0. So, I had to switch to 1 stored as a char and then divided by 2 to decode the value to a double. Then it was a few bytes over, so I had to switch from WeekendObsession's gun to Moebius's gun. But, in order to have any accuracy with that, I needed to add a setAdjustGunForRobotTurn(true);, which cost 5 bytes and still left me 2 bytes over. If you think you could help, I could post my code.

By the way, I recently helped Chase with his Talon project--a nano with MRM. But I have a feeling that there is a more effective way to implement wall avoidance...

Sheldor12:02, 19 March 2013

Send me your version that has the best performance but is only a few bytes over, I might have an idea of how to shrink it... as well as a secret weapon which does the same ;-)

Skilgannon14:52, 19 March 2013
 

THANKS! If I can get it below 250 with the original gun, it would probably take 2nd from Sabreur, and might even give LBB a rough time (until, of course, Mike updates the tables).

Do you want me to post the code here, on a new page, or actually package the bot and host it on the repository?

Sheldor15:21, 19 March 2013
 

Just the code is great.

Skilgannon15:35, 19 March 2013
 

I didn't compile this so there may be a few minor errors. Thanks again.

/*
Epeeist v2.0.0 by Sheldor.  03/19/2013
A NanoBot with multi-mode movement and a Pattern Matching gun.
Codesize: ??? Bytes without any colors.
 
Epee (pronounced aay-pay) is one of the three forms of modern sport fencing,
along with Foil and Sabre.  http://en.wikipedia.org/wiki/Epee
 
Credits: 
Pattern Matching code from simonton.WeekendObsession_S and mld.Moebius,
and a general thanks to all open source bot authors and contributors to the RoboWiki.
 
Epeeist is open source and released under the terms of the RoboWiki Public Code License (RWPCL) - Version 1.1
see license here: http://robowiki.net/wiki/RWPCL
*/
 
package sheldor.nano;
 
import robocode.*;
import robocode.util.Utils;
 
public class Epeeist extends AdvancedRobot
{
	//Global variables.
	static double direction;
	static double enemyEnergy;
 
	static int deathCount;	
 
	//En garde!
	public void run()
	{
		//setAdjustGunForRobotTurn(true);
 
		//Start spinning radar and initialize direction to infinity.
		setTurnRadarRightRadians(direction = Double.POSITIVE_INFINITY);
	}
 
	public void onScannedRobot(ScannedRobotEvent e)
	{
		//Local variables.
		int matchLength = 30;
		double absoluteBearing;
		double distance;
		int i;
		int index;
 
		//Oscillating/Random movement.
		if (enemyEnergy > (enemyEnergy = e.getEnergy()))
		//if((enemyEnergy - (enemyEnergy = e.getEnergy())) > (Math.round(Math.random() * chancesOfReversing.charAt(deathCount)) * 111))
		//if( (char) ((enemyEnergy - 1.09  - (enemyEnergy = e.getEnergy()))) < 2)
		{
			direction *= (chancesOfReversing.charAt(deathCount) - Math.random());
			//direction *= (chancesOfReversing.charAt(deathCount) - (Math.random() * 2));
		}		
		setAhead(direction);
 
		//Stay perpendicular to the enemy.
		setTurnRightRadians(Math.cos(absoluteBearing = e.getBearingRadians()) + ((160 - (distance = e.getDistance())) * (getVelocity() / 2500)));
 
		//Pattern Matching.
		/*enemyHistory = String.valueOf((char) (e.getVelocity() * (Math.sin(e.getHeadingRadians() - (absoluteBearing += getHeadingRadians()))))).concat(enemyHistory);
 
    	// search for a match
    	while((matchPosition = enemyHistory.indexOf(enemyHistory.substring(0, integer--), 14)) < 0);
 
    	// calculate aim offset
    	integer = 14;
    	do { absoluteBearing += ((short) enemyHistory.charAt(--matchPosition)) /  160; } while (--integer > 0);*/
 
		//Pattern Matching
		enemyHistory = String.valueOf((char)(e.getVelocity() * Math.sin(e.getHeadingRadians() - (absoluteBearing += getHeadingRadians())))).concat(enemyHistory);
		while((index = enemyHistory.indexOf(enemyHistory.substring(0, matchLength--), (i = (int)(distance / 12.5)))) < 0);
		do
		{
			absoluteBearing += (short)enemyHistory.charAt(index--) / distance;
		}while(--i > 0);
 
		//Aim at the predicted target.
		setTurnGunRightRadians(Utils.normalRelativeAngle(absoluteBearing - getGunHeadingRadians()));
 
		//Fire!
		setFire(2.5);
 
		//Infinite radar lock.
		setTurnRadarLeftRadians(getRadarTurnRemainingRadians());
	}
 
	public void onDeath(DeathEvent e)
	{
		deathCount++;
	}
 
	public void onHitWall(HitWallEvent e)
	{
		//Reverse direction when the bot hits a wall.
		direction = -direction;
	}
 
	static String chancesOfReversing = ""
		+ (char) 1 + (char) 0 + (char) 1 + (char) 0
		+ (char) 1 + (char) 0 + (char) .5 + (char) .5
		+ (char) .5 + (char) .5 + (char) .5 + (char) .5
		+ (char) .5 + (char) .5 + (char) .5 + (char) .5
		+ (char) .5 + (char) .5 + (char) .5 + (char) .5
		+ (char) .5 + (char) .5 + (char) .5 + (char) .5
		+ (char) .5 + (char) .5 + (char) .5 + (char) .5
		+ (char) .5 + (char) .5 + (char) .5 + (char) .5
		+ (char) .5 + (char) .5 + (char) .5 + (char) .5
		+ (char) .5 + (char) .5 + (char) .5 + (char) .5
		+ (char) .5 + (char) .5 + (char) .5 + (char) .5
		+ (char) .5 + (char) .5 + (char) .5 + (char) .5
		+ (char) .5 + (char) .5 + (char) .5 + (char) .5
		+ (char) .5 + (char) .5 + (char) .5 + (char) .5
		+ (char) .5 + (char) .5 + (char) .5 + (char) .5
		+ (char) .5 + (char) .5 + (char) .5 + (char) .5
		+ (char) .5 + (char) .5 + (char) .5 + (char) .5
		+ (char) .5 + (char) .5 + (char) .5 + (char) .5
		+ (char) .5 + (char) .5 + (char) .5 + (char) .5
		+ (char) .5 + (char) .5 + (char) .5 + (char) .5
		+ (char) .5 + (char) .5 + (char) .5 + (char) .5
		+ (char) .5 + (char) .5 + (char) .5 + (char) .5
		+ (char) .5 + (char) .5 + (char) .5 + (char) .5
		+ (char) .5 + (char) .5 + (char) .5 + (char) .5
		+ (char) .5 + (char) .5 + (char) .5 + (char) .5
		+ (char) .5 + (char) .5 + (char) .5 + (char) .5
		+ (char) .5 + (char) .5 + (char) .5 + (char) .5
		+ (char) .5 + (char) .5 + (char) .5 + (char) .5
		+ (char) .5 + (char) .5 + (char) .5 + (char) .5
		+ (char) .5 + (char) .5 + (char) .5 + (char) .5
		+ (char) .5 + (char) .5 + (char) .5 + (char) .5
		+ (char) .5 + (char) .5 + (char) .5 + (char) .5
		+ (char) .5 + (char) .5 + (char) .5 + (char) .5
		+ (char) .5 + (char) .5 + (char) .5 + (char) .5
		+ (char) .5 + (char) .5 + (char) .5 + (char) .5
		+ (char) .5 + (char) .5 + (char) .5 + (char) .5
		+ (char) .5 + (char) .5 + (char) .5 + (char) .5
		+ (char) .5 + (char) .5 + (char) .5 + (char) .5
		+ (char) .5 + (char) .5 + (char) .5 + (char) .5
		+ (char) .5 + (char) .5 + (char) .5 + (char) .5
		+ (char) .5 + (char) .5 + (char) .5 + (char) .5
		+ (char) .5 + (char) .5 + (char) .5 + (char) .5
		+ (char) .5 + (char) .5 + (char) .5 + (char) .5
		+ (char) .5 + (char) .5 + (char) .5 + (char) .5
		+ (char) .5 + (char) .5 + (char) .5 + (char) .5
		+ (char) .5 + (char) .5 + (char) .5 + (char) .5
		+ (char) .5 + (char) .5 + (char) .5 + (char) .5
		+ (char) .5 + (char) .5 + (char) .5 + (char) .5
		+ (char) .5 + (char) .5 + (char) .5 + (char) .5
		+ (char) .5 + (char) .5 + (char) .5 + (char) .5
		+ (char) .5 + (char) .5 + (char) .5 + (char) .5
		+ (char) .5 + (char) .5 + (char) .5 + (char) .5
		+ (char) .5 + (char) .5 + (char) .5 + (char) .5
		+ (char) .5 + (char) .5 + (char) .5 + (char) .5
		+ (char) .5 + (char) .5 + (char) .5 + (char) .5
		+ (char) .5 + (char) .5 + (char) .5 + (char) .5
		+ (char) .5 + (char) .5 + (char) .5 + (char) .5
		+ (char) .5 + (char) .5 + (char) .5 + (char) .5
		+ (char) .5 + (char) .5 + (char) .5 + (char) .5
		+ (char) .5 + (char) .5 + (char) .5 + (char) .5
		+ (char) .5 + (char) .5 + (char) .5 + (char) .5
		+ (char) .5 + (char) .5 + (char) .5 + (char) .5
		+ (char) .5 + (char) .5 + (char) .5 + (char) .5
		+ (char) .5 + (char) .5 + (char) .5 + (char) .5
		+ (char) .5 + (char) .5 + (char) .5 + (char) .5
		+ (char) .5 + (char) .5 + (char) .5 + (char) .5;
 
	//Preloaded log of enemy movements for pattern matcher.
	static String enemyHistory = ""
		+ (char) 1 + (char) 1 + (char) 1 + (char) 1
		+ (char) 1 + (char) 1 + (char) 1 + (char) 1
		+ (char) 1 + (char) 1 + (char) 1 + (char) 1
		+ (char) 1 + (char) 1 + (char) 1 + (char) 1
		+ (char) 1 + (char) 1 + (char) 1 + (char) 1
		+ (char) 1 + (char) 1 + (char) 1 + (char) 1
		+ (char) 1 + (char) 1 + (char) 1 + (char) 1
		+ (char) 1 + (char) 1 + (char) 1 + (char) 1
		+ (char) 1 + (char) 1 + (char) 1 + (char) 1
		+ (char) 1 + (char) 1 + (char) 1 + (char) 1
		+ (char) 1 + (char) 1 + (char) 1 + (char) 1
		+ (char) 1 + (char) 1 + (char) 1 + (char) 1
		+ (char) 1 + (char) 1 + (char) 1 + (char) 1
		+ (char) 1 + (char) 1 + (char) 1 + (char) 1
		+ (char) 1 + (char) 1 + (char) 1 + (char) 1
		+ (char) 1 + (char) 1 + (char) 1 + (char) 1
		+ (char) 1 + (char) 1 + (char) 1 + (char) 1
		+ (char) 1 + (char) 1 + (char) 1 + (char) 1
		+ (char) 1 + (char) 1 + (char) 1 + (char) 1
		+ (char) 1 + (char) 1 + (char) 1 + (char) 1
		+ (char) 1 + (char) 1 + (char) 1 + (char) 1
		+ (char) 1 + (char) 1 + (char) 1 + (char) 1
		+ (char) 1 + (char) 1 + (char) 1 + (char) 1
		+ (char) 1 + (char) 1 + (char) 1 + (char) 1
		+ (char) 1 + (char) 1 + (char) 1 + (char) 1
		+ (char) 1 + (char) 1 + (char) 1 + (char) 1
		+ (char) 1 + (char) 1 + (char) 1 + (char) 1
		+ (char) 1 + (char) 1 + (char) 1 + (char) 1
		+ (char) 1 + (char) 1 + (char) 1 + (char) 1
		+ (char) 1 + (char) 1 + (char) 1 + (char) 1
		+ (char) 1 + (char) 1 + (char) 1 + (char) 1
		+ (char) 1 + (char) 1 + (char) 1 + (char) 1
		+ (char) 1 + (char) 1 + (char) 1 + (char) 1
		+ (char) 1 + (char) 1 + (char) 1 + (char) 1
		+ (char) 1 + (char) 1 + (char) 1 + (char) 1
		+ (char) 1 + (char) 1 + (char) 1 + (char) 1
		+ (char) 1 + (char) 1 + (char) 1 + (char) 1
		+ (char) 1 + (char) 1 + (char) 1 + (char) 1
		+ (char) 1 + (char) 1 + (char) 1 + (char) 1
		+ (char) 1 + (char) 1 + (char) 1 + (char) 1
		+ (char) 1 + (char) 1 + (char) 1 + (char) 1
		+ (char) 1 + (char) 1 + (char) 1 + (char) 2
		+ (char) 1 + (char) 1 + (char) 1 + (char) 1
		+ (char) 1 + (char) 1 + (char) 1 + (char) 1
		+ (char) 1 + (char) 1 + (char) 1 + (char) 1
		+ (char) 1 + (char) 1 + (char) 1 + (char) 1
		+ (char) 1 + (char) 1 + (char) 1 + (char) 1
		+ (char) 1 + (char) 1 + (char) 1 + (char) 1
		+ (char) 1 + (char) 1 + (char) 1 + (char) 1
		+ (char) 1 + (char) 1 + (char) 1 + (char) 1
		+ (char) 1 + (char) 1 + (char) 1 + (char) 1
		+ (char) 1 + (char) 1 + (char) 1 + (char) 1
		+ (char) 1 + (char) 1 + (char) 1 + (char) 1
		+ (char) 1 + (char) 1 + (char) 1 + (char) 1
		+ (char) 1 + (char) 1 + (char) 1 + (char) 1
		+ (char) 1 + (char) 1 + (char) 1 + (char) 1
		+ (char) 1 + (char) 1 + (char) 1 + (char) 1
		+ (char) 1 + (char) 1 + (char) 1 + (char) 1
		+ (char) 1 + (char) 1 + (char) 1 + (char) 1
		+ (char) 1 + (char) 1 + (char) 1 + (char) 1
		+ (char) 1 + (char) 1 + (char) 1 + (char) 1
		+ (char) 1 + (char) 1 + (char) 1 + (char) 1
		+ (char) 1 + (char) 1 + (char) 1 + (char)-1
		+ (char) 1 + (char) 1 + (char) 1 + (char) 1
		+ (char) 1 + (char) 1 + (char) 1 + (char) 1
		+ (char) 1 + (char) 1 + (char) 1 + (char) 1
		+ (char) 1 + (char) 1 + (char) 1 + (char) 1
		+ (char) 1 + (char) 1 + (char) 1 + (char) 1
		+ (char) 1 + (char) 1 + (char) 1 + (char) 1
		+ (char) 1 + (char) 1 + (char) 1 + (char) 1
		+ (char) 1 + (char) 1 + (char) 1 + (char) 1
		+ (char) 1 + (char) 1 + (char) 1 + (char) 1
		+ (char) 1 + (char) 1 + (char) 1 + (char) 1
		+ (char) 1 + (char) 1 + (char) 1 + (char) 1
		+ (char) 1 + (char) 1 + (char) 1 + (char) 1
		+ (char) 1 + (char) 1 + (char) 1 + (char) 1
		+ (char) 1 + (char) 1 + (char) 1 + (char) 1
		+ (char) 1 + (char) 1 + (char) 1 + (char) 1
		+ (char) 1 + (char) 1 + (char) 1 + (char) 1
		+ (char) 1 + (char) 1 + (char) 1 + (char) 1
		+ (char) 1 + (char) 1 + (char) 1 + (char) 1
		+ (char) 1 + (char) 1 + (char) 1 + (char) 1
		+ (char) 1 + (char) 1 + (char) 1 + (char) 1
		+ (char) 1 + (char) 1 + (char) 1 + (char) 1
		+ (char) 1 + (char)-2 + (char)-4 + (char)-6
		+ (char)-8 + (char)-8 + (char)-8 + (char)-8
		+ (char)-8 + (char)-8 + (char)-8 + (char)-8
		+ (char)-8 + (char)-8 + (char)-8 + (char)-8
		+ (char)-8 + (char)-8 + (char)-8 + (char)-8
		+ (char)-8 + (char)-8 + (char)-8 + (char)-8
		+ (char)-8 + (char)-8 + (char)-8 + (char)-8
		+ (char)-8 + (char)-8 + (char)-8 + (char)-8
		+ (char)-8 + (char)-8 + (char)-8 + (char)-8
		+ (char)-8 + (char)-8 + (char)-8 + (char)-8
		+ (char)-8 + (char)-8 + (char)-8 + (char)-8
		+ (char)-7 + (char)-6 + (char)-5 + (char)-4
		+ (char)-3 + (char)-2 + (char)-1 + (char)1
		+ (char) 2 + (char) 4 + (char) 6 + (char) 8
		+ (char) 8 + (char) 8 + (char) 8 + (char) 8
		+ (char) 8 + (char) 8 + (char) 8 + (char) 8
		+ (char) 8 + (char) 8 + (char) 8 + (char) 8
		+ (char) 8 + (char) 8 + (char) 8 + (char) 8
		+ (char) 8 + (char) 8 + (char) 8 + (char) 8
		+ (char) 8 + (char) 8 + (char) 8 + (char) 8
		+ (char) 8 + (char) 8 + (char) 8 + (char) 8
		+ (char) 8 + (char) 8 + (char) 8 + (char) 8
		+ (char) 8 + (char) 8 + (char) 8 + (char) 8
		+ (char) 8 + (char) 8 + (char) 8 + (char) 8
		+ (char) 7 + (char) 6 + (char) 5 + (char) 4
		+ (char) 3 + (char) 2 + (char) 1 + (char) 1;
}
Sheldor15:59, 19 March 2013
 

I'll look at this a bit tonight. There is a savings that can be had by compiling with a different Java compiler. I remember that :)

Miked080123:24, 19 March 2013

Thanks.

Skilgannon has already addressed the issue on another talk page, but I would appreciate any help I can get.

Sheldor02:00, 20 March 2013
 

BTW, I still feel very that LBB is a pretty cheezy bot. Abusing tables like that probably shouldn't be fair. It takes hours and hours though to get each bot optimized so maybe that makes it a little better overall. besting Moebius is a better accomplishment. At least he doesn't cheat...

Miked080123:30, 19 March 2013
 
 
 
Personal tools