Lines light

The game starts with a 9×9 board with three balls chosen out of seven different colors. The player can move one ball per turn.
The difference between light version and original is in the player’s possibility to place a ball into any free place.
Solution of the following tasks can be helpful: Find sequence
Here is how your function will be executed:
checkio({
'steps':[[1,1],[1,2]], #list of coordinates for last game iteration
'colors':[1,3,5], #list of ball (possible values is 1..9) colors
#for next iteration
'map':[[0,1, ....], .... ], #current map is array of arrays.
#0 - empty place, 1..9 - with ball
'clear':[[2,3],], #array or coordunates, wich was removed from map
'score': 50, #your current score
'all_colors':7 # count of all possible colors.
# Increase after every 200 scores.
})
Your function "checkio" must return an array of 2 arrays - coordinates of movement
[[1,2] [3,4]] # move ball from 1,2 to 3,4

Inline learning provides a simple and interesting way to learn the Python basics. Due to these learning courses soon you’ll start making real Python programs and resolve tasks on Checkio.org.
Learning Courses enable you to polish your coding skills by resolving base tasks from simple to complex ones, grouped according to their subjects.
Catalog of Tasks enables you not only to resolve various tasks and publish your solutions, but also to exchange experience with other members and to increase your skill level.
Score games provide an exciting opportunity to play

Console
Services
Timeline
Live help
Login







8
891
824
Oct. 25, 2011 2:46 a.m. #
Downloadable version plays offline for like 400-1200 moves (depending on random) but I do not able to get online version working. Is there any problem with the server?
Oct. 25, 2011 2:50 a.m. #
Oct. 25, 2011 3:08 a.m. #
If I remove all logic from game it plays nice, cause it finishing withing timeout. However, logic is heavy, so game cannot finish playing during allowed timeframe, so I get 504 error.
Can someone please give more details about how much time/cpu power solution can use?
Or, preferable, is there any possibility to play game one move at a time? So checker will not try to get full session results, but do one iteration in a run.
Oct. 26, 2011 3:12 a.m. #
Oct. 26, 2011 6:22 a.m. #
This release we plan in 1-2 weeks already.
Oct. 26, 2011 7:59 a.m. #
And keep a good work!
Oct. 31, 2011 9:07 a.m. #
What do you think about it?
Nov. 8, 2011 7:51 a.m. #
Nov. 10, 2011 3:56 a.m. #
Oct. 26, 2011 4:49 p.m. #
Jan. 12, 2012 10:06 a.m. #
I noticed, that now there is no time-out problems.
I enhanced my solution a bit, now watch it playing.
The score is 2026 already, and I wonder when it will loose :)
However, I found a stupid bug in the code and will have to play once again when I fix it.
I have one question though: solutions for the competition games are closed? Is there any way to compare other people code with mine? This could be interesting.
Jan. 12, 2012 12:38 p.m. #
In competitions you can play between programs
Jan. 13, 2012 1:44 a.m. #
However, something went wrong and all freeze.
Results not get to the site :)
Please check:
http://imageshack.us/photo/my-images/12/resultcr.jpg/
Jan. 13, 2012 4:12 a.m. #
Jan. 13, 2012 5:14 a.m. #
Jan. 13, 2012 5:32 a.m. #
Jan. 13, 2012 5:37 a.m. #
Jan. 13, 2012 3:38 a.m. #
After polishes and fixes my solution can play this game for a very long time. And there is big chance that either server will halt/give 500 error or something else happened.
Is it possible to add current score to callback?
So I can halt it on any score that I want?
Jan. 13, 2012 4:31 a.m. #
Jan. 14, 2012 7:38 p.m. #
Jan. 16, 2012 4:56 a.m. #
Jan. 14, 2012 7:54 p.m. #
Jan. 14, 2012 8:36 p.m. #
Jan. 15, 2012 12:35 a.m. #
Jan. 16, 2012 1:39 a.m. #
Maybe you should set limit? Like 10000 is enough?
Or, add one more colour every 1000 score? So there will be end of the game.
Jan. 16, 2012 4:42 a.m. #
Thank you.
Jan. 16, 2012 4:56 a.m. #
Jan. 16, 2012 4:45 a.m. #
Jan. 16, 2012 4:55 a.m. #
Jan. 16, 2012 4:54 a.m. #
Also, as I understand, right now every other game for the top uses different random seed. Have you considered using same seeds, so all solutions will be in the same positions?
Maybe top game should be played against 10 such seeds, so no hard-coded solutions.
Jan. 16, 2012 4:59 a.m. #
Jan. 17, 2012 2:40 a.m. #
thank you for your attention
Jan. 18, 2012 5:15 a.m. #
Jan. 16, 2012 5:04 a.m. #
http://clip2net.com/clip/m81657/1326711793-cliphyc245-47kb.png
First os always different, but the second is always the same.
Only authorized users can reply. Login