HP Forums
HP Prime contest in python : "Fiat Lux !" - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html)
+--- Forum: HP Prime (/forum-5.html)
+--- Thread: HP Prime contest in python : "Fiat Lux !" (/thread-11491.html)



HP Prime contest in python : "Fiat Lux !" - ggauny@live.fr - 09-30-2018 08:33 AM

Hi,

HP corp. is participing to a contest in python.
The code is written by a french mathematics professor : Critor.
In attachement you have the application "Force" to run.

Your control panel of 30 potentiometers from 0 to 1 allows you to control up to 252 lamps.
Light up a maximum of light bulbs with minimal energy while wasting as little as possible.
Syntax: pot (..., ...) to be completed with the potentiometer number from 0 to 29 and its value from 0 to 1.
Example: pot (3,0.8) pushes the number 3 potentiometer to 80%.

Tape [CAS] to start.

My score is 192 points but the best (right now is 217).

I wonder what is the best way to reach the really maximum points ?

Surely with high mathematics, some says genetic algorithm, others says
lineaires systems.... Me I do empiric way but of course not very good, very long
and not very efficient !

May be some advertising to help me ?

Thank, enjoy, good sunday !


RE: HP Prime contest in python : "Fiat Lux !" - eried - 10-03-2018 11:58 AM

Oh, nice. I remember this style on a similar contest months ago (about planets) I was lost in translation and my submission was super crappy Big Grin

I will try again this time.

Related with what you ask, you probably have 2 ways, bruteforce and analyzing what the code does right? have you tried to read the code?

It might be easier to see the NumWorks version because is a more "vanilla" flavor of Python but they seem similar except some calls to HP Prime bit commands

For everyone (I am not sure if is open worldwide):

Link:
https://tiplanet.org/forum/viewtopic.php?p=235402#p235402

This is the score board:
https://tiplanet.org/triconcours.php


RE: HP Prime contest in python : "Fiat Lux !" - critor - 10-03-2018 02:56 PM

It is open worldwide, yes.

Have fun. Smile


RE: HP Prime contest in python : "Fiat Lux !" - ggauny@live.fr - 10-03-2018 05:03 PM

Hi Eried,

Yes I have read the code but I don't understand at all,
but now I have 211 points (I am the last).

Me I try as this : I play with a "seed" and after I adjust and I retry and so on.

It is not good but it lake me mathematics, for me maths are magic. Mathematiciens
can do everythings with.

Thank you.


RE: HP Prime contest in python : "Fiat Lux !" - eried - 10-03-2018 07:53 PM

(10-03-2018 02:56 PM)critor Wrote:  It is open worldwide, yes.

Have fun. Smile

Nice!

(10-03-2018 05:03 PM)ggauny@live.fr Wrote:  Hi Eried,

Yes I have read the code but I don't understand at all,
but now I have 211 points (I am the last).

Me I try as this : I play with a "seed" and after I adjust and I retry and so on.

It is not good but it lake me mathematics, for me maths are magic. Mathematiciens
can do everythings with.

Thank you.

Is a quite clever way of making a contest. I tried to check the first stage (the one about drawing a flower) but the emulator is in french, so meh. Also the instructions are quite confusing when translated.

About what you are doing with the "seed": I think that is the bruteforce way. I already sent my submission using the same bruteforce way too Smile

My conclusions after playing with the puzzle for few minutes (they might be wrong):
1) there is a lot of local maximums in that function, that work as traps
2) pot range increments should be larger than 0.005 (i.e. 0, 0.005, 0.01, and so)
3) starting with the pots around 0.125 seems to give some high scores


RE: HP Prime contest in python : "Fiat Lux !" - pier4r - 10-03-2018 09:09 PM

Side note. I have to say that the tiplanet.org community, mostly french I presume, it is quite developed with a lot of challenges. Quite nice for a relatively regional community about calculators (n1).

https://tiplanet.org/forum/index.php

n1: I mean the potential userbase is around 200 million speakers, that are plenty in theory, but people interested in calculators are normally rare in general.


RE: HP Prime contest in python : "Fiat Lux !" - ggauny@live.fr - 10-04-2018 07:02 AM

Hi Eried,

I agree with you : seed 0.125, it's also my point of begining.
I have also edited all potentiometers full power (eg pot(0), equivalent to pot 0
100%).

Please see attachement for this.


RE: HP Prime contest in python : "Fiat Lux !" - ggauny@live.fr - 11-30-2018 04:04 PM

Dear Eried,

Congratulations because you have win Triconcours Ti Planet !
Me I have loose unfortunately.
Good evening from France.


RE: HP Prime contest in python : "Fiat Lux !" - eried - 12-04-2018 02:03 PM

(11-30-2018 04:04 PM)ggauny@live.fr Wrote:  Dear Eried,

Congratulations because you have win Triconcours Ti Planet !
Me I have loose unfortunately.
Good evening from France.

Thanks! It was super fun at the end. It was not a nice attempt though
https://erwin.ried.cl/post/180137142402/a-cool-calculator-challenge-triconcours-universel

It is always a pleasure to get new free calculators!