HexTree

United Kingdom

Age: 23

Apr
27
comment Python: How to chain boolean tests to get False as soon as it gets the first False
You are referring to short circuiting. Yes I believe in your streamlined example it should 'short circuit' the equation if gotside is true, hence not bother with the rest. If not, then maybe you need brackets to enclose all the rest of the checks into one set of parentheses.
Mar
23
comment Pi/Infinite Numbers
Screw it, let's just go back to calling it infinite.
Mar
14
answered Find three consecutive natural numbers, whose product is 81204. (Select the equation.)
Mar
2
comment Find all paths between two graph nodes
Do you want paths that don't repeat vertices/edges?
Feb
24
comment What are good "real" programming examples for a beginning programmer?
Yes I still use my old salary/tax calculator regularly.
Feb
24
comment Python higher-order sequence assignment?
I don't really see how this matches the question.
Feb
24
answered Can you be terrible at math and still a great programmer?
Feb
24
comment I have problems with using find_last_of
Well, what you find if you print out the stuff at position 1308? Seems like there's a good deal of more debugging you could do before asking the question.
Feb
22
awarded Supporter
Feb
21
awarded Editor
Feb
21
awarded Teacher
Feb
17
awarded Teacher
Feb
17
awarded Editor
Feb
13
comment What machine learning algorithm is appropriate for shooting basketballs?
Oh, you want a succinct formula, like some sort of best approximating polynomial? Hmm, well I would start by gathering as much data as you can first. There are various methods of finding best approximating polynomials given data, and they'll probably give you a good solution for your entire range. Maybe this might help; en.wikipedia.org/wiki/Polynomial_interpolation It won't require any machine learning.
Feb
13
comment What machine learning algorithm is appropriate for shooting basketballs?
Well if it only takes a couple of tries, then I don't think machine learning is relevant at all, you can quite easily work out the correct speeds and tilts by trial and error.
Feb
13
comment What machine learning algorithm is appropriate for shooting basketballs?
I picked 100 arbitrarily. Whatever number suits you best, but 1 would be too few for this method. I don't understand what you mean by "We can work out tilt and speed for one given input ourselves". If you can, then surely you are already done and don't need any algorithm at all? If you are trying to find the best speed and tilt for a given distance, then you would have to keep the distance fixed and vary the speed and tilt to find the best solution for that distance. You can do this for each distance, and build up a table of good speeds/tilts.
Feb
13
revised What machine learning algorithm is appropriate for shooting basketballs?
added 967 characters in body
Feb
13
revised What machine learning algorithm is appropriate for shooting basketballs?
added 967 characters in body
Feb
13
answered What machine learning algorithm is appropriate for shooting basketballs?
Feb
10
comment algorithm to check if an array (with 9 positions) has the integers 1 to 9,independent of how they are sorted
I don't think there was any restriction on the number range. Otherwise the trivial solution would be just to check for the existence of any repeats. If there are any repeats then you have all nine numbers.
1 2 3