File I/O from Squirrel
Moderator: OpenTTD Developers
-
- Engineer
- Posts: 70
- Joined: 05 Jun 2008 15:51
File I/O from Squirrel
Hi, I am trying to create an AI for the TJIP contest, and I was wondering whether the NOAI framework allows writing to/reading from files? And if so, if someone could give me a short example?
Nunc dimittis servum tuum Domine secundum verbum tuum in pace
Re: NoAI Branch - An AI Framework
It doesn't allow that. The only thing you can write text to is de console (and the ingame ai debug panel). You can do that by using AILog.Info/Warning/Error.
-
- Engineer
- Posts: 70
- Joined: 05 Jun 2008 15:51
Re: NoAI Branch - An AI Framework
thanks for the reply. I guess I'll just have to use the script mechanism to output the console to a file, and copy-paste from there to my code.Yexo wrote:It doesn't allow that. The only thing you can write text to is de console (and the ingame ai debug panel). You can do that by using AILog.Info/Warning/Error.
In case you were wondering: I want to tune my AI by learning values for some of the decisions, and it would have been nice if I could just write them to some file and load them when needed.
Nunc dimittis servum tuum Domine secundum verbum tuum in pace
Re: NoAI Branch - An AI Framework
Nightlies run every night at 1800 CEST ... and the commits are made after that So check back in ... 10 minuteswilco_moerman wrote: (..)
OK, any idea when it will apear on http://nightly.openttd.org/noai/scoreboard.php? Because that is still r13442 instead of r13454
Avoid FlySpray, I don't read that I hope to have a subforum soon, then this will get a bit more organizedwilco_moerman wrote:maybe I'll do that.Thanks for reporting and please keep posting any bugs here or on flyspray. If you want a fast reaction or follow latest development, irc is a good place (#openttd.noai @OFTC).
It most likely is Good luck with using a NN for this problem ... I wonder if it ever leads to anything Can't wait to see if it doeswilco_moerman wrote: I wanted to start a server with restart_game_year = 2007 and starting in 1998 (for the TJIP challenge) and just let it run all night for testing. But if the game crashes after each "newgame" that won't work.
I am trying to implement an AI using a neural network, but networks need a lot of runs to train. That is why I need to start new games and save and load data. The network needs to be stored and loaded between each run. The saving works by using the console to output a script. I'll try to do the loading by modifying the .nut-files automatically using some Java-programming. I'll just get the parts I need from the console-output and substitute them into the .nut-file.
It might be ugly, but as far as I can see it's the only way to transfer information between successive AI's.
The only thing necessary for the triumph of evil is for good men to do nothing.
-
- Engineer
- Posts: 70
- Joined: 05 Jun 2008 15:51
Re: NoAI Branch - An AI Framework
I'm counting the secondsTrueLight wrote:Nightlies run every night at 1800 CEST ... and the commits are made after that So check back in ... 10 minuteswilco_moerman wrote: (..)
OK, any idea when it will apear on http://nightly.openttd.org/noai/scoreboard.php? Because that is still r13442 instead of r13454
yeah I read the topic on that. Seems only logical.TrueLight wrote: Avoid FlySpray, I don't read that I hope to have a subforum soon, then this will get a bit more organized
at least as long as NOAI doesn't implement any file IOTrueLight wrote: It most likely is
I'll let you know. I have successfully used a NN together with reinforcement learning for my master's thesis, so I thought I would give it a try.TrueLight wrote: Good luck with using a NN for this problem ... I wonder if it ever leads to anything Can't wait to see if it does
Nunc dimittis servum tuum Domine secundum verbum tuum in pace
Who is online
Users browsing this forum: No registered users and 15 guests