Interactive Problems

Back to General discussions forum

Moriarty     2014-11-22 01:06:21
User avatar

Firstly, Awesome! Great potential for new problems.

Minor feedback, would be much easier if we could use POST parameters instead of raw data in the requests.

Guy Gervais     2014-11-22 03:13:32
User avatar

Hey guys, long time no see.

Those interactive problems are really cool. We need more. :)

Rodion (admin)     2014-11-22 05:51:48
User avatar

Hello, Guy! We were really missing you! Hope you are well! :)

> would be much easier if we could use POST parameters

I think I can add such a feature easily enough (at least I'll try). Are you going to post the data with html form? :)

Moriarty     2014-11-22 06:49:14
User avatar

Not really, but the bot implementation will not require a parser, if the I/O happens via parameters.

Moff     2014-11-22 12:35:31
User avatar

Hi, Guy! Glad to see you!

would be much easier if we could use POST parameters

It's not convenient for me, but i'll accept the rules.

Moff     2014-11-22 12:40:43
User avatar

I try to make some illegal moves at Nim Game.

===SEND===
token: j7mfYku0s2sVRxqZtkH65zY2
move: 0 0
===RECEIVE===
end: game is lost

error: You are trying to take too many elements from the heap

0 is too many?

===SEND===
token: yH+IxFUT5W7HzUspengInTE4
move: -1 -1
===RECEIVE===
end: game is lost

error: Move should have a form of two integers

-1 -1 are integers.

Rodion (admin)     2014-11-22 14:34:07
User avatar

Hope we can support both formats (and perhaps some more in future).

From now on it should be possible to send either raw data as initially or url-encoded.

For latter it is important to set the Content-Type: application/x-www-form-urlencoded.

I also created page with examples in Python after Nicolas Patrois hinted this could be helpful in some cases: Post Requests in Python.

> I try to make some illegal moves at Nim Game.

Ha-ha :)

It is quite good you decided to test this thoroughly! I'm especially interested to know that there is no some simple way of cheating with tokens...

I'll try to take care of these vague error messages, thanks for pointing this!

P.S.:

if ($x < 1 || $x > $this->state->heaps[$p]) {
    return 'You are trying to take too many elements from the heap';
}

I agree, this is bit too stupid piece of code - I'm afraid I was too hasty... :)

Please login and solve 5 problems to be able to post at forum