HP Prime contest in python : "Fiat Lux !"
09-30-2018, 08:33 AM
Post: #1
 ggauny@live.fr Senior Member Posts: 502 Joined: Nov 2014
HP Prime contest in python : "Fiat Lux !"
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 !

Attached File(s) Thumbnail(s)

Gérard.
10-03-2018, 11:58 AM
Post: #2
 eried Senior Member Posts: 741 Joined: Dec 2013
RE: HP Prime contest in python : "Fiat Lux !"
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

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):

https://tiplanet.org/forum/viewtopic.php...02#p235402

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

My website: erwin.ried.cl
10-03-2018, 02:56 PM
Post: #3
 critor Junior Member Posts: 29 Joined: Jul 2014
RE: HP Prime contest in python : "Fiat Lux !"
It is open worldwide, yes.

Have fun.
10-03-2018, 05:03 PM
Post: #4
 ggauny@live.fr Senior Member Posts: 502 Joined: Nov 2014
RE: HP Prime contest in python : "Fiat Lux !"
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.

Gérard.
10-03-2018, 07:53 PM (This post was last modified: 10-03-2018 07:55 PM by eried.)
Post: #5
 eried Senior Member Posts: 741 Joined: Dec 2013
RE: HP Prime contest in python : "Fiat Lux !"
(10-03-2018 02:56 PM)critor Wrote:  It is open worldwide, yes.

Have fun.

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

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

My website: erwin.ried.cl
10-03-2018, 09:09 PM (This post was last modified: 10-03-2018 09:12 PM by pier4r.)
Post: #6
 pier4r Senior Member Posts: 2,056 Joined: Nov 2014
RE: HP Prime contest in python : "Fiat Lux !"
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.

Wikis are great, Contribute :)
10-04-2018, 07:02 AM (This post was last modified: 10-04-2018 07:03 AM by ggauny@live.fr.)
Post: #7
 ggauny@live.fr Senior Member Posts: 502 Joined: Nov 2014
RE: HP Prime contest in python : "Fiat Lux !"
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%).

Attached File(s)

Gérard.
11-30-2018, 04:04 PM
Post: #8
 ggauny@live.fr Senior Member Posts: 502 Joined: Nov 2014
RE: HP Prime contest in python : "Fiat Lux !"
Dear Eried,

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

Gérard.
12-04-2018, 02:03 PM
Post: #9
 eried Senior Member Posts: 741 Joined: Dec 2013
RE: HP Prime contest in python : "Fiat Lux !"
(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/...-universel

It is always a pleasure to get new free calculators!

My website: erwin.ried.cl
 « Next Oldest | Next Newest »

User(s) browsing this thread: 1 Guest(s)