BL2 Bot Player

Discuss about Blockout II from Jean-Luc, post your feature requests etc.
Post Reply
fredjust
Posts: 66
Joined: Fri Jun 29, 2007 3:59 pm

Re:BL2 Bot Player

Post by fredjust »

I don\'t understand why you count block number
An AI play so fast, it\'s illimited no ?

more complex : with AI play 1000 cubes on 3DM (or 1500 on OOC) and try to beat human score<br><br>Post edited by: fredjust, at: 2008/02/11 19:57
jlp_38
Posts: 264
Joined: Tue Jun 26, 2007 9:09 am

Re:BL2 Bot Player

Post by jlp_38 »

To Lieven:

I don\'t know if my new strategy will work in 3x3xX mode. I don\'t have time to make some tests this evening but tomorrow I\'m
at home so I\'ll perform some tests. My new strategy is based on
a \"reviewed\" version of your Edges function. It seems that the
CommonEgde + Edge strategy is very efficient. I\'ll tell you more
soon.

To fredjust:

No it is not unlimited. You can get a \"fatal sequence\" that
brings you to \"game over\". If you want to compare the AI and
the human, you can play in practice mode (OOC) and try to
beat 141915 cubes. That\'s may be very looooooong :woohoo:
Anyway, concerning the score, our evaluations are not based
on multi-line strategy so, I don\'t think (may be I\'m wrong)
that the AI can beat the human (at least for the moment).
But it is in project....
jlp_38
Posts: 264
Joined: Tue Jun 26, 2007 9:09 am

Re:BL2 Bot Player

Post by jlp_38 »

Here are the result made over 2000 runs in EXTENDED mode:

Uniform randomizer:

3x3x6: Avg=73.7265 Min=15 Max=412
3x3x10: Avg=192.986 Min=44 Max=922
3x3x18: Avg=441.767 Min=117 Max=1379

Bag randomizer:

3x3x6: Avg=70.8795 Min=17 Max=314 Human (kdyang) (Max=394)
3x3x10: Avg=195.612 Min=53 Max=922 Human (kdyang) (Max=748)
3x3x18: Avg=453.742 Min=157 Max=1377 Human (kdyang) (Max=873)

So human and AI seem to be almost at the same level :)
jlp_38
Posts: 264
Joined: Tue Jun 26, 2007 9:09 am

Re:BL2 Bot Player

Post by jlp_38 »

Hi,

Some interesting stats (without the demo bug):

3x3x6 BASIC

-> 947 (>400000 runs) Lieven\'s eval
-> 813 (5000 runs) JL\'s eval

3x3x10 EXTENDED:

-> 192 (5000 runs) JL\'s eval
-> 190 (5000 runs) Lieven\'s eval

I got the 3x3x6 BASIC evaluation in all cases (OOC settings are worst)

That\'s funny to see that in 3x3x10 EXTENDED, 2 very differents
evaluations give the same result (Do we reach the max ?)

However it seems that the GetCommonEdge is less efficient with
the BASIC blockset, I think that the Smoothness in more important
with the BASIC blockset.

Anyway, I\'m still investigating on the Poisson stuff. I\'m
currently making a distribution on 500000 runs but this time,
using the number of block instead of the number of cube. Hope
to get rid of the combinatory algebra (1v + 2w + 3x + 4y + 5z = n)

I let you informed...
jlp_38
Posts: 264
Joined: Tue Jun 26, 2007 9:09 am

Re:BL2 Bot Player

Post by jlp_38 »

Good news, I managed to improve a bit the Lieven\'s function
in 3x3x6 BASIC (~50 cubes, tested on 5000 runs) by adding my
new Edges function.
I was thinking that the 2 Edges function (my new one
and the Lieven\'s one) was doing approximately the same thing
but I was wrong.
May be some improvements are still possible for my evaluation.
I didn\'t manage to get better result by integrating the
Lieven\'s edge function to my eval :(
Lieven
Posts: 55
Joined: Sun Aug 05, 2007 6:31 am

Re:BL2 Bot Player

Post by Lieven »

Interesting results, keep us posted :)

Just a word about the distributions. The Poisson stuff works, but I had to apply a trick to the results to make it work. The trick is to count the number of restarts for a fixed nr of blocks/cubes. Counting the number of blocks is indeed better than the number of cubes.

Now the straightforward distribution (lifetime of one series), is clearly an exponential decay.

http://en.wikipedia.org/wiki/Exponential_decay

That is, the probability of failure is constant throughout. (well, except for the very beginning, where by the very nature of our problem it is impossible to fail). In order to see this: Consider starting with 100000 simultaneous blockout games, the decrease in games at a specific time is proportional to the number of games left.

I did not use this distribution, since I couldn\'t find any theory on confidence intervals.

It should be very easy to fit an exponential to the curve (leaving out the first values).
Lieven
Posts: 55
Joined: Sun Aug 05, 2007 6:31 am

Re:BL2 Bot Player

Post by Lieven »

It is a pity I don\'t have time to work on this for the moment (busy with work). However, one approach which might be good in 3x3x6 is an asymmetric edge function. That is: given the choice, all factors equal place the cube in the upper right corner rather than the lower left corner. Blocks are coming in in the lower left corner, so keeping that spot free is good to have a maximum choice of rotations/translations. I think the effect of this will be minimal, but there should be some.

To improve dramatically in 3x3x6, I really believe that \'looking ahead\' as I mentioned before will make a lot of difference. Now that you have done all these speed improvements, this approach should be more within reach.
jlp_38
Posts: 264
Joined: Tue Jun 26, 2007 9:09 am

Re:BL2 Bot Player

Post by jlp_38 »

Thanks you very much for your advices concerning stats problem.
My goal is of course to try to get a correct approximation of
the average cubes or blocks with a minimum of runs (tests
in OOC are still long) so we can make good scan to find best
values for the evaluation.

Concerning edges, we\'ve got the same idea. In fact I was trying
to normalize your edges function (in order to make it work
with my eval) and i realize that it should be better to put
the block in the opposite corner. To do that i simply applied
a coefficient function of the \"distance to the origin\" and
it has brought 50 cubes. However, unexpected result
in OCC. Surprise, it is not exactly the same logic ;)
I really didn\'t manage to make your edge function work with
my eval. I think that the commonEdge and Edges function
cannot work together :(

Concerning min-max, it can be done later. The base of the min-max
algo is the evaluation function so i think we should already
try to optimize the eval.
jlp_38
Posts: 264
Joined: Tue Jun 26, 2007 9:09 am

Re:BL2 Bot Player

Post by jlp_38 »

Hi,

A new improvement. There was a bug since the begining in my flatness function :(. The function always return 0 except when
some blocks touch the top of the pit. And it has an FX !
It gives in fact a \"malus\" when a block is at the top.
So i correct the flatness function and add it to my eval
no improvement :( I also tried the smoothness and no
improvement too. But that means that the GetCommonEdge is
working almost alone and gives rather good results :)

However i added the \"fist line malus\" to the Lieven\'s eval
and I win ~70 cubes (tested on ~3000 runs)
This gives me an idea to model much better the edge/top
bonus/malus. I think I will affect a coefficient for
each case in the pit. That should allow to make a good
model of this stuff.

I let you informed...
jlp_38
Posts: 264
Joined: Tue Jun 26, 2007 9:09 am

Re:BL2 Bot Player

Post by jlp_38 »

I made some modifs on the game to debug the evaluation.
You can now by pressing [z] see what the AI will play.
The text gives the note of the current pos.

I\'ll upload the code on sf ASAP.

Image
jlp_38
Posts: 264
Joined: Tue Jun 26, 2007 9:09 am

Re:BL2 Bot Player

Post by jlp_38 »

Last results: 3x3x6 BASIC

Lieven\'s eval:
Avg=1239.61 Min=31 Max=15449 nbGame=1000
2min 32sec, 8158.66 cps

JL\'s eval:
Avg=981.835 Min=32 Max=6646 nbGame=1000
1min 27sec, 11312.1 cps

Image
Lieven
Posts: 55
Joined: Sun Aug 05, 2007 6:31 am

Re:BL2 Bot Player

Post by Lieven »

That is really really nice 1200+! But you can hardly call it my eval anymore :)

From what you posted; perhaps my eval can be used for the

3 x >=3 x >=6 modes

and

your eval for the

4 x >=4 x >=6 modes

Also, I was thinking about writing an automatic parameter finder, which finds \"optimal parameters\" for every mode. If I have time in the weekend, I might give that a try.
jlp_38
Posts: 264
Joined: Tue Jun 26, 2007 9:09 am

Re:BL2 Bot Player

Post by jlp_38 »

I still need to make some tests. I think your eval is quite
good with the basic block set. It is a very particular
block set. There is not straight beam so there are pit configs
which are really bad. For instance, a what I call \"a 1 cube size
pit\" and I think that your \"smoothness square\" detects
this kind of situation very well. My eval loses a considerable
number of games on such a situation. I will try a \"smoothness
cube\".

I think the eval can still be optimized, 3 ways of research:

- Try to detect \"covered hole\"
- A better pit bonus/malus management for edges
- Try to understand and analyse short games

I let you informed.<br><br>Post edited by: jlp_38, at: 2008/02/14 13:58
jlp_38
Posts: 264
Joined: Tue Jun 26, 2007 9:09 am

Re:BL2 Bot Player

Post by jlp_38 »

Hi,

I finally managed to make the GetCommonEdge works with
the Lieven\'s eval :)

Avg=1337.82 Min=32 Max=12105 nbGame=1000
2min 01sec, 11028.6 cps
jlp_38
Posts: 264
Joined: Tue Jun 26, 2007 9:09 am

Re:BL2 Bot Player

Post by jlp_38 »

I added the pit bonus/malus array :)

Avg=1418.16 Min=32(11901586) Max=11705 nbGame=1000
2min 19sec, 10167.4 cps
Post Reply