Back to General discussions forum
Was thinking of it for some time, at last have found a day to code it. Testing is predictably difficult, but the game comparatively easy (because of lacking diagonal moves and because foxes are not very clever this time).
Please feel free to tell your opinion. I have a mind to add "advanced" version (13 geese, diagonal moves and single fox, though using something closer to proper minimax).
I've completed Bear Hunt, but with this problem I get "error: Bad token" with my first POST containing something like
token=...&start=1&geese=au
Grae, hello!
Do you send header with Content-Type:application/x-www-form-urlencoded
in the request? I poorly remember how the data
format is detected - shall check quickly.
UPD ok, seemingly currently the code detects format depending on header, as I suppose, but let me a few minutes and I'll try to modify it so it can hopefully autodetect. This should be more user-friendly...
Hi Rodion, I'm not sending that header, but what I'm doing worked for Bear Hunt and Say 100
Grae, hello once more!
(looked at your code for bear - really there was no header - no idea how this worked... yet... will investigate)
However just updated the parsing function a bit so that it should be "more intelligent". Please try again - perhaps it would behave better now.
Thanks, I'm getting past that bit now.
Everything working ok now, but you may want to delete my solution, as I just played the game manually!
Ha-ha-ha :) No, I guess, let's keep it - it is significant amount of code anyway and it clearly says about manual approach.
I also only played it manually (though using curl
command-line tool to send requests).
Thanks for testing and that feedback about format detection. These tasks were neglected for quite some time (due to difficulty of updating them in google infrastructure), but hopefully we can now improve them by and by. And it seems instruction needs to be updated too.