New Bot: Defender
New Bot: Defender
Defender
Defender was specifically designed for starting scenarios. He will not try to win the game, but he will work hard to protect the countries he was assigned at the beginning of the game.
http://sillysoft.net/wiki/?Defender
Please let me know what you think, and if you have any suggestions for improvement, let me know!
Defender was specifically designed for starting scenarios. He will not try to win the game, but he will work hard to protect the countries he was assigned at the beginning of the game.
http://sillysoft.net/wiki/?Defender
Please let me know what you think, and if you have any suggestions for improvement, let me know!
- my wife hates me
- Lux Elder
- Posts: 2664
- Joined: Fri Sep 22, 2006 4:45 am
- Location: I TOOK MY BED BACK
- Contact:
Well, I had to teach myself JavaScript earlier this year, so I was somewhat familiar with programming basics.
I definitely enjoyed the experience, and I'm looking forward to making a bot that will try to win, but for now I have a long list of maps I need to make...
As far as which starting scenarios to try Defender with, I would recommend Cube Wars, Anglo-Celtic Isles, and definitely The Dark Ages. I usually play with 5 bots: Reaper, BotOfDoom, Sparrow, Killbot, and Defender.
One reason I came up with Defender is to use him in map scenarios as a "Switzerland" player. They're neutral, but you still have the option to take over the land if it fits your strategic goals.
I definitely enjoyed the experience, and I'm looking forward to making a bot that will try to win, but for now I have a long list of maps I need to make...
As far as which starting scenarios to try Defender with, I would recommend Cube Wars, Anglo-Celtic Isles, and definitely The Dark Ages. I usually play with 5 bots: Reaper, BotOfDoom, Sparrow, Killbot, and Defender.
One reason I came up with Defender is to use him in map scenarios as a "Switzerland" player. They're neutral, but you still have the option to take over the land if it fits your strategic goals.
- Blind Willie
- Lux Veteran
- Posts: 1144
- Joined: Fri May 20, 2005 3:06 am
- Location: Satellite of Love
I was wondering if anyone else tried that. That was the first setup I used when I downloaded Defender. Now I want those 30 minutes of my life back.dustin wrote:random start 5,5,5 classic (or duex) games played against 5 defenders is an interesting exercise.
Anyway, great bot Sun. It definitely makes scenarios more interesting, and it also works quite well on maps without continents like Chess.
Thanks for another cool contribution to Lux.
- newbeslaya
- Slayer of Newbs
- Posts: 190
- Joined: Fri Oct 06, 2006 5:59 pm
- Location: California
Just so you know, Defender doesn't try to win the game, he just tries to protect it's own territories.newbeslaya wrote:I played with a few defenders and I felt the game was a bit too simple.... Once you get any bonus, the defenders are useless because they cant keep up with the amount of men you have. Just a thought...
I'll be updating Defender soon so that it tries to win the game if it gets a huge advantage, but it still won't actively try to win the game like a normal bot.
- Black Pope
- Lux Exorcist
- Posts: 3878
- Joined: Tue Sep 06, 2005 5:36 pm
- Location: God's Right Hand
The interesting thing for me when playing against a defender bot is that if he gets a good start, he can really make things difficult. I played a classic game where he started with oz; he would rack up armies and charge to win back territories in NA that he lost; it really was fun.
In my mind, you've created a really fun, unique bot. My only suggestion is the same as the others; if you can and want, if you convinced the bot to go for and hold a continent, he can really make things difficult for others attempting to hold a continent where he had a previous territory.
Thanks for all you do, man...you rock.
In my mind, you've created a really fun, unique bot. My only suggestion is the same as the others; if you can and want, if you convinced the bot to go for and hold a continent, he can really make things difficult for others attempting to hold a continent where he had a previous territory.
Thanks for all you do, man...you rock.
- RandomGuy
- Lux Veteran
- Posts: 1463
- Joined: Mon Mar 05, 2007 12:02 am
- Location: Central American Jungle
- Contact:
FYI: I think Defender is getting tripped up by one-way connections.
I got the following error when someone took one of his countries, but he couldn't get back to it directly:
oops. Defender called attack() with two countries that don't touch.
java.lang.Exception: Stack trace
at java.lang.Thread.dumpStack(Unknown Source)
at com.sillysoft.lux.B.A(Unknown Source)
at com.sillysoft.lux.Board.attack(Unknown Source)
at com.sillysoft.lux.Board.attack(Unknown Source)
at com.sillysoft.lux.agent.Defender.safeAttack(Defender.java:964)
at com.sillysoft.lux.agent.Defender.attackWeakestTarget(Defender.java:898)
at com.sillysoft.lux.agent.Defender.attackPhase(Defender.java:261)
at com.sillysoft.lux.B.Z(Unknown Source)
at com.sillysoft.lux.B.P(Unknown Source)
at com.sillysoft.lux.B.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
I got the following error when someone took one of his countries, but he couldn't get back to it directly:
oops. Defender called attack() with two countries that don't touch.
java.lang.Exception: Stack trace
at java.lang.Thread.dumpStack(Unknown Source)
at com.sillysoft.lux.B.A(Unknown Source)
at com.sillysoft.lux.Board.attack(Unknown Source)
at com.sillysoft.lux.Board.attack(Unknown Source)
at com.sillysoft.lux.agent.Defender.safeAttack(Defender.java:964)
at com.sillysoft.lux.agent.Defender.attackWeakestTarget(Defender.java:898)
at com.sillysoft.lux.agent.Defender.attackPhase(Defender.java:261)
at com.sillysoft.lux.B.Z(Unknown Source)
at com.sillysoft.lux.B.P(Unknown Source)
at com.sillysoft.lux.B.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Thanks for the tip RD... is there any way you could let me know the specifics of what was happening at the time?
I though I had one-way connections taken care of, but there may be instances I've missed.
FYI, there's also a bug whenever there's only one continent on the map.
I'm almost finished coding a new set of general methods that I can use for any bots I eventually make. I'll soon be rebuilding Defender from scratch using these new methods.
I though I had one-way connections taken care of, but there may be instances I've missed.
FYI, there's also a bug whenever there's only one continent on the map.
I'm almost finished coding a new set of general methods that I can use for any bots I eventually make. I'll soon be rebuilding Defender from scratch using these new methods.
- RandomGuy
- Lux Veteran
- Posts: 1463
- Joined: Mon Mar 05, 2007 12:02 am
- Location: Central American Jungle
- Contact:
I was playing djdee's organ grinder map, which has a series of one way connections through the "heart". 1 -> 2 -> 3 -> 4. Where many points on the map connect to 1, and 4 connects to many others while through the middle it is one way.
In the starting scenario, I think Defender started with 4 - but that got taken by the person in 3. And he got stuck spinning his wheels trying to figure out (I presume) how to take 4 back...considering he had to go through 1, 2 and 3 which he never owned.
Hope that helps.
In the starting scenario, I think Defender started with 4 - but that got taken by the person in 3. And he got stuck spinning his wheels trying to figure out (I presume) how to take 4 back...considering he had to go through 1, 2 and 3 which he never owned.
Hope that helps.
- newbeslaya
- Slayer of Newbs
- Posts: 190
- Joined: Fri Oct 06, 2006 5:59 pm
- Location: California
- newbeslaya
- Slayer of Newbs
- Posts: 190
- Joined: Fri Oct 06, 2006 5:59 pm
- Location: California
- newbeslaya
- Slayer of Newbs
- Posts: 190
- Joined: Fri Oct 06, 2006 5:59 pm
- Location: California
- enjoymoreradio
- Lux Addict
- Posts: 552
- Joined: Mon Apr 30, 2007 5:47 pm
- Location: Walking uphill both ways in the snow
If he has enough armies on his borders to be 99% sure that he can conquer the rest of the map, he will do so in the next version.enjoymoreradio wrote:How enormous is "enormous?"
Off the top of my head, I think a simple approximation would be about 2-3 times the number of enemy armies on the board.
For testing purposes, I can email you a beta version of the next Defender.
You could always split up Defender into two players if you don't want Defender to go berserk.enjoymoreradio wrote:I've got a map in the conception stages that will make extensive use of Defender and he will be fairly powerful as a player and I don't want him to go on a rampage and kill everything on his first turn.
- enjoymoreradio
- Lux Addict
- Posts: 552
- Joined: Mon Apr 30, 2007 5:47 pm
- Location: Walking uphill both ways in the snow
Well, I'd do that but Defender needs a steady stream of income to function the way I want him to.
(Ultimately, the best thing for the map would be a kind of Empty/Defender hybrid, that acted like Empty when it controlled its allotment of countries, but like Defender when it needed to reconquer something.)
(Ultimately, the best thing for the map would be a kind of Empty/Defender hybrid, that acted like Empty when it controlled its allotment of countries, but like Defender when it needed to reconquer something.)
Check out this feature request! A new Defender feature is in the works...
FYI - Since some starting scenarios will give Defender such a huge advantage , I'm going to make it an option for players as to whether Defender will try to win the game or not.
FYI - Since some starting scenarios will give Defender such a huge advantage , I'm going to make it an option for players as to whether Defender will try to win the game or not.
Defender has been updated!
Defender now has several default preferences you can set by editing Defender.txt in a text editor, which is located in the Lux/Support/Agents/ folder. The options are:
Typing 'Defender help' will bring up the following help screen:
Defender now has several default preferences you can set by editing Defender.txt in a text editor, which is located in the Lux/Support/Agents/ folder. The options are:
- winGame = true or false - Determines whether Defender will try to win the game if he gets an enormous advantage.
- popContinents = true or false - Determines whether Defender will try to pop continents.
- killForCards = true or false - Determines whether Defender will try to kill players for cards.
- farmForCards = true or false - Determines whether Defender will try to farm easy countries for cards.
- chat% = 0-100 - Determines the percentage of Defender's turns that he will chat.
Typing 'Defender help' will bring up the following help screen:
Code: Select all
Type the following commands in the chat box to change how Defender will play this game.
The default settings can be set in Defender.txt, located in the Lux > Support > Agents folder.
Defender help --> This message will appear in the chat
Defender status --> View the current Defender settings
Defender reset --> Reset all options to defaults
Defender win --> Defender will try to win the game
Defender nowin --> Defender will not try to win the game
Defender pop --> Defender will pop continents
Defender nopop --> Defender will not pop continents
Defender kill --> Defender will kill players for cards
Defender nokill --> Defender will not kill players for cards
Defender farm --> Defender will farm for cards
Defender nofarm --> Defender will not farm for cards
Defender chat --> Defender will chat
Defender nochat --> Defender will not chat
Who is online
Users browsing this forum: No registered users and 46 guests