- Created Monday, May 26th 2014 @ 06:00:41
I've developed a simple bot in haskell but I can't get it to pass the tests after compilation.
It always says "test failed: no output". My bot do output in response to engine's Action messages.
I tried the bellow program which I should write something to the standard output after each engine's message. But I still get "test failed: no output".
main = do s <- getLine hPutStrLn stdout "fold 0" main
Any help is appreciated.
- Created Monday, May 26th 2014 @ 10:33:21
Up to this point, we haven't tested our Haskell support yet, so it is possible that something is broken. Can you send your bot to firstname.lastname@example.org, then I'll try to fix it asap
- Created Monday, May 26th 2014 @ 20:24:30
Thanks Jim. I just sent the email.
- Created Monday, May 26th 2014 @ 20:36:11
alright thank you. It might be a while before it's fixed though. Really busy with the finals of Warlight atm
- Created Wednesday, May 28th 2014 @ 02:27:18
main = forever $ putStrLn "output!!!!"
"test failed: no output"
- Created Wednesday, June 4th 2014 @ 07:03:07
Any leads? Haskell is the only language I know :(
- Created Wednesday, June 4th 2014 @ 16:39:50
I'll see if I have time this Friday, otherwise I'll try to fix it next week. I'll keep you updated :)
- Created Saturday, June 28th 2014 @ 00:43:01
If you release the engine / setup I might be able to figure it out for you.
- Created Sunday, June 29th 2014 @ 07:32:15
Hey sevenfive.. there was another thread where a developer had built a .net bot that you could test your bot against... i haven't tested it, but its worth a shot...
or it could be a huge waste of time if the problem is simply a config issue with theaigames haskell support =P
- Created Monday, June 30th 2014 @ 15:35:22
@sevenfive The problem is that we run all bots from a jail environment, thus we need to include everything that's needed to run -in this case- the haskell program. I've tried a lot of things, but this is the standard way of compiling the bot to an executable:
ghc -o bin/run_ai --make $MAINHS
where $MAINHS is the main haskell file. This actually compiles the bot correctly, and it even runs correctly, outside of the jail. But as soon as it's ran from inside the jail, as all bots are, it won't output anything. At all. Not even errors and this is why I can't figure out what's going wrong.
I've tried compiling to a static executable, same result.
So I'm obviously missing some libraries/binaries/dependencies to put inside the jail, but I really don't know Haskell that well to know what I'm missing. So this is what's in the jail right now:
libc.so.6 libdl.so.2 libffi.so.6 libgmp.so.10 libgmp.so.3 libm.so.6 libpthread.so.0 librt.so.1 libtinfo.so.5 libutil.so.1
That should be all the binaries that are needed, so I think there are libraries missing from ghc or something. I've tried adding the whole GHC folder to the jail just to test it out (because it's about 800Mb and that's just too large), but that doesn't work either.
So any help would be appreciated, from anyone with some Haskell knowledge, as I'm getting frustrated because I get 0 feedback about what's going wrong from running the bot.