[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/functions.php on line 4586: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3765)
[phpBB Debug] PHP Warning: in file /includes/functions.php on line 4588: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3765)
[phpBB Debug] PHP Warning: in file /includes/functions.php on line 4589: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3765)
[phpBB Debug] PHP Warning: in file /includes/functions.php on line 4590: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3765)
AI Challenge Forums • View topic - GameEngine/Viewer/Replay/Human/TCP in one. [updated]

It is currently Fri Jan 19, 2018 5:19 pm Advanced search

GameEngine/Viewer/Replay/Human/TCP in one. [updated]

Code won't compile? Found a bug? Post here!

GameEngine/Viewer/Replay/Human/TCP in one. [updated]

Postby delt0r » Tue Sep 21, 2010 6:42 am

This is Yet Another Game Player/ Viewer. However it also lets you watch TCP games live (and save them) and you can play against your own bot if you wish. There is also a replay option.

Its a far from perfect but may be useful anyway. Here is the link.

To run just use java -jar JBotManager.jar or double click may even work. This post is the documentation. Otherwise the source is included in the jar.

General controls: ">" plays ">>" plays faster, while the play button will slow it down. Arrow keys should work when the viewer has keyboard focus. You can drag the bar in the top panel to any game turn. Solid lines is ship count. Dotted is income. The unlabeled slider at the bottom is "planetSize".

Replay
To the left you have java's crappy JFileChooser. Select a replay file by highlighting and hitting enter or double clicking. On the right you have the replay.

Bots
Here you add bots for the other panels. You need to enter a valid command line per bot. The defaults won't work unless your directory structure matches mine. So adjust as needed. (selected, add , delete).

TCP
This one is straight forward. Reps is the number of games it will play. If save is selected it will save every game in the working directory. Its threaded so you can look at replays will the TCP pane is doing its thing. But keep an eye out on std out. Thats where the server game message go.

Human
This is for debugging. I can set up situations as i need. However its not a "nice" interface. Set the timeout to be very high, then you can take your time with moves. Hitting Enter will finish the turn (now space also). 0-9 control how many ships are sent. 0 for 100% 1 for 10%. You cannot undo a move. You can select (toggle) multiple planets via the shift key. You can drag the mouse to add your planets to the selection, the planet you release the mouse button on becomes the target. If you click on a single selected planet, you select all your planets, if you click when more than one is selected, the selection is set to just the clicked planet. I forgot a "stop" so you have to finish the game. holding down enter can work.

I lurk in #aichallenge if you need extra help.

edit to update human interface description.
Last edited by delt0r on Fri Oct 08, 2010 9:34 am, edited 3 times in total.
It was like that when I got here.
User avatar
delt0r
Colonel
 
Posts: 89
Joined: Sun Sep 12, 2010 8:03 am

Re: GamePlayer/Viewer/Replay/Human/TCP in one. (java)

Postby delt0r » Tue Sep 21, 2010 6:45 am

I forgot in the human case... and in general you need to specify a *path* to the map in the map text field. If its a relative path, it must be relative to the working directory.
It was like that when I got here.
User avatar
delt0r
Colonel
 
Posts: 89
Joined: Sun Sep 12, 2010 8:03 am

Re: GameEngine/Viewer/Replay/Human/TCP in one. (java)

Postby artyom_shegeda » Tue Sep 21, 2010 12:19 pm

Good work!

But i didn't found how to decrease speed of replay
Also it would be good to implement PlayGame.jar/ShowGame.jar behavior. User selects bots and then starts the simulation.
Also there no way to specify amount of fleets in Human Play and Pause doesn't work :(
At least, I think that fleets with arrows are better than direction lines.
artyom_shegeda
Lieutenant
 
Posts: 14
Joined: Wed Sep 15, 2010 7:43 pm

Re: GameEngine/Viewer/Replay/Human/TCP in one. (java)

Postby delt0r » Tue Sep 21, 2010 1:02 pm

It was like that when I got here.
User avatar
delt0r
Colonel
 
Posts: 89
Joined: Sun Sep 12, 2010 8:03 am

Re: GameEngine/Viewer/Replay/Human/TCP in one. (java)

Postby delt0r » Tue Sep 21, 2010 2:58 pm

So the missing panel has been added.
It was like that when I got here.
User avatar
delt0r
Colonel
 
Posts: 89
Joined: Sun Sep 12, 2010 8:03 am

Re: GameEngine/Viewer/Replay/Human/TCP in one. (java)

Postby artyom_shegeda » Tue Sep 21, 2010 5:22 pm

two more bugs:
If user doesn't specifies turn limit then it stays at value "2000". The limit of turns becomes updated only if user changes control's value.
Replays don't appear in replays list just after battle finished - refresh is required now to see new replay. Can you refres list automatically?

wish list:
It would be good to save parameters.
User must specify the maps folder once and then select map from dropdown whenever he want.
artyom_shegeda
Lieutenant
 
Posts: 14
Joined: Wed Sep 15, 2010 7:43 pm

Re: GameEngine/Viewer/Replay/Human/TCP in one. (java)

Postby delt0r » Tue Sep 21, 2010 6:28 pm

Some good suggestions. However I am away for 3 days, I may get it done on the laptop, but i may not.

Also as for the maps. I tried your suggestion before. It didn't work so well as there are 200 maps in my maps folder. Drop downs don't work well in that situation.
It was like that when I got here.
User avatar
delt0r
Colonel
 
Posts: 89
Joined: Sun Sep 12, 2010 8:03 am

Re: GameEngine/Viewer/Replay/Human/TCP in one. (java)

Postby delt0r » Tue Sep 21, 2010 8:33 pm

Well, i added most of your suggestions. Its makes it quite a bit more useful.

Turn limit now matches the GUI. I only save bot command lines between sessions. The replay file view is updated where needed. Finally the map text fields are now combo boxes. Type in a dir and hit enter, and the dir listing is added to the combo. Much easier to select a map.

So new version is there now. Just a word of warning, check that you get the new version and that the browser doesn't cache an old copy.
It was like that when I got here.
User avatar
delt0r
Colonel
 
Posts: 89
Joined: Sun Sep 12, 2010 8:03 am

Re: GameEngine/Viewer/Replay/Human/TCP in one. (java)

Postby aerique » Thu Sep 30, 2010 7:50 pm

Hi, thanks for this utility! I'm mainly using it for the replay functionality but it has been very helpful so far.

TCP doesn't work for me. Says "network unreachable" while it isn't but it doesn't really matter for me.
aerique
Brigadier-General
 
Posts: 131
Joined: Fri Feb 05, 2010 3:23 pm
Location: Netherlands

Re: GameEngine/Viewer/Replay/Human/TCP in one. (java)

Postby delt0r » Fri Oct 01, 2010 7:00 pm

I am surprised about the network issue. I have using is some quite different places with pretty strict firewalls without problems.
It was like that when I got here.
User avatar
delt0r
Colonel
 
Posts: 89
Joined: Sun Sep 12, 2010 8:03 am

Next

Return to Technical Issues

Who is online

Users browsing this forum: No registered users and 1 guest

cron