Forums Index >> Modding >> Dedicated Server question



Page : <1> :


How do I make my dedicated server save the scores from each game to a text file?

I would also like the ability to close the dedicated server by an external command, if that is possible.

Thanks.

Saturday, April 16, 2005 at 3:08:21 PM

Well, I should be able to make that score recorder, and what u mean by external command? U write closeserver(); on console and it closes the server? If yes I'll script that for ya too


Saturday, April 16, 2005 at 3:21:13 PM

What I want to do is set up a server to fight different Bot AIs against each other and save the scores to a text file so I don't have to sit there and watch the whole thing and write them down by hand. That means it should run without a person being in the game (if that's not possible I can join the game myself and then walk away).

Ideally I should be able to have another program issue the closeserver command so that it can swap out Bot AI settings, but again, if that's not possible I can get around it. The saving the scores to text files is the most important part.

Thanks.

Saturday, April 16, 2005 at 3:31:27 PM

Well, I could make a score recorder, but it would still stop playing the server until someonejoined, about the second part, on the first post u said u wanted to close the dedicated server by hand, to do that write quit(); on the console, but then ur asking if we can change bots? That is possible but I cant do it without tank.cs


Saturday, April 16, 2005 at 4:02:51 PM

Don't worry about the bot changing - I can handle that. I just need the ability to log the scores to a text file. The rest is just icing, but not necessary.

 

Last edited: Saturday, April 16, 2005 at 4:14:11 PM

Saturday, April 16, 2005 at 4:12:17 PM

What are you researching TMO? Sounds like some military intelligence gathering project? :P

 

 

-Rx

 

 

Sunday, April 17, 2005 at 2:05:44 PM

Not quite THAT high level. Just combining trying to build a better bot brain with a long-time desire to attempt something using a Genetic Algorithm method. I've read about them, but never had a project where it was applicable. (with degrees in both math and computer science, I have wierd ideas of fun sometimes %) )

I built a spreadsheet that holds all the AI commands and added routines to build a totally random AI, and export a set of AIs into the cs files. I can enter the results of battles into it, and it will build a 'child' from the two best performing bots. I ran through 6 sets of 3 battles yesterday by hand, and it took for-freaking-EVER!

If I can get the scores output to a text file, I can have the spreadsheet run the contests overnight and do the judging automatically without me having to check the computer every 15 minutes and write everything down (quickly!).

I started out with the 3 standard light bots and 3 randoms, and ran them through the 6 tests. All of the standard bots have finally been eliminated from the 'gene pool' (Gold finally died after the 6th round - Bronze died after the 1st, Silver in the 2nd), leaving me with 1 of my original random AIs, 4 children and grandchildren, and 1 newly generated random.

I took my 3 best performing AIs against the Uberbots in Team Battlemode, just to see, and they lost handily 35-25. :P They've still got some evolving to do...

If I can get this set up, I think I'll also increase it to hold 10 bots instead of just 6 - gives more room for variation and lets more combinations be tested.

Last edited: Sunday, April 17, 2005 at 2:47:07 PM

Sunday, April 17, 2005 at 2:44:40 PM


 

U write closeserver(); on console and it closes the server? If yes I'll script that for ya too

 

Cant you just click the "x" in the top-right corner of the console like the rest of us ???

 

 

 

 

 

Last edited: Sunday, April 17, 2005 at 6:07:36 PM

Sunday, April 17, 2005 at 6:07:14 PM

I can - Excel can't. ;)

Sunday, April 17, 2005 at 6:50:31 PM

Hey TMO,

That is very sophisticated! We use genetic algorithms at work, so I am familiar with how they work. Great idea to automate the process!

 

 

-Rx

 

 

Sunday, April 17, 2005 at 11:08:31 PM

@Art,

Any luck with the score saver script so far?

Again, thanks for the help!

Tuesday, April 19, 2005 at 7:37:19 PM

Yea, I just need one info, windows, linux or mac?


Wednesday, April 20, 2005 at 6:10:57 AM

Windows - (XP Home ed if that matters). :)

Wednesday, April 20, 2005 at 9:24:25 AM

Ok, there is no prob about that.
Tommorow night it should be ready for giving to you, just wait (I cant finish it now cos of busyness :( )


Wednesday, April 20, 2005 at 10:48:38 AM

Hey, no problem at all!! I've got other projects that really need my attention. I've just been so anxious to try this out that I've been checking this thread a couple times a day, just hoping. XD So now I'll wait to check back until tomorrow.

Mucho Thankso!

Wednesday, April 20, 2005 at 12:00:23 PM

Well, I just finished it, its quite simple, but I think this is what you want:

 

----------------
LOGGING NEW GAME
BlueTeam: 0
GreenTeam: 999
Art Crazyİ: 999
Mud [Bot]: 0
Zot [Bot]: 0
Mal [Bot]: 0
Ri [Bot]: 0
Fud [Bot]: 0
Moo [Bot]: 0
LOG ENDED

 

I'll be e-mailing it to your profile's e-mail soon!


Last edited: Thursday, April 21, 2005 at 12:18:59 PM

Thursday, April 21, 2005 at 12:18:03 PM

Looks perfect! If there are multiple games, does it overwrite or append?

Thursday, April 21, 2005 at 1:29:44 PM

Append, and I included my mac fix for append in it that im gonna include in the admin script -- Please do not release the source nor the.dso


Friday, April 22, 2005 at 6:38:50 AM

Not a problem. I have not received the code, so if you sent it last night it needs to be resent.

Friday, April 22, 2005 at 6:57:54 AM

Well, I sent it to your msn e-mail, so it should be there


Friday, April 22, 2005 at 9:43:46 AM

Erm... I don't HAVE an msn email. *scratches head* The email in my PTT profile is yahoo. I bet you used my IM account, which looks like an email, but I've never used it as one.

Friday, April 22, 2005 at 11:01:38 AM

It works Great!! Thanks! I still have to modify my program to read the output, but that shouldn't take too long.

Friday, April 22, 2005 at 7:39:00 PM
b20

Hey is the script coming to public tommorow? :o

- b20

Friday, April 22, 2005 at 7:48:33 PM

Its not comming public :P
Well I might make it public, but not tommorrow


Saturday, April 23, 2005 at 4:08:01 AM

And I have strict instructions not to give it to anyone, so it's mine, ALL MINE!!! MUAHAHAHAHAHAHA!!! %)

Saturday, April 23, 2005 at 6:35:11 AM

And mine :P


Sunday, April 24, 2005 at 4:30:04 AM

Sigh.... How is it art you have the source code for this game? All of my gui's are dso and I know that at the end of the game it displays the scores using a gui....
jeez.... You can only do so much if you cant do much at all...

 

 

 

 

Tuesday, April 26, 2005 at 9:28:55 PM

Nope, no source, NO SOURCE
My brain is enough, I dont need the source like some ppl do :P


Wednesday, April 27, 2005 at 6:08:06 AM

@Rx - having to modify my methods a bit. I wound up with a bunch of AIs that were basically clones of each other. :P

Wednesday, April 27, 2005 at 11:13:33 AM

Page : <1> :

insert quote insert url insert email insert image bold italic underline superscript subscript horizontal rule : : Help on using forum codes

Add comment:

HTML is disabled within comments, but ZBB Code is enabled.

Back to the top

Web site designed, maintained and funded by -z- and Dan MacDonald