Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi test

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

MATLAB Academy

New to MATLAB?

Learn MATLAB today!

Alfonso Nieto-Castanon

View profile information

Personal Profile


Alfonso Nieto-Castanon submitted a Comment to Problem 677. Vine Contest 1-D Case Optimization: Board 78

optimal score values (until proven otherwise):...... 20244 20244 20238 14563 2564

on 30 Nov 2015 at 3:52

Alfonso Nieto-Castanon submitted a Comment to Problem 42688. Determine the full width at half max

@Carl: the solutions already work this way, in this example the distance between "the points half-way between y(1) and y(2), and between y(5) and y(6)" is 5.5-1.5 (i.e. four, not five)

on 23 Nov 2015 at 21:37

Alfonso Nieto-Castanon submitted a Comment to Solution 777471

I agree, many Cody problems take the opposite route (they force players to find analytical solutions by using very stringent error tolerances or very large numbers/samples) but very few problems favor algorithmic approaches over analytical solutions when both exist (code complexity/cost is perhaps the only evaluation measure that might work this way for some problems; e.g. sum(1:n) vs. n*(n+1)/2). As a problem creator, finding an appropriate evaluation measure is likely the best way to try to "bias" players towards a particular implementation/approach (but imo on of the best things about Cody is the way players will surprise you with unexpected approaches if you let them). Last, just for clarity, this particular solution is not really an analytical solution, and it would still fail to converge for very large Na Nb numbers. It is just a Markov chain reformulation of the problem which simply converges considerably faster than Monte Carlo but it can still be improved in many ways...

on 17 Nov 2015 at 16:45

Alfonso Nieto-Castanon submitted a Comment to Solution 775628

Thanks for the response!. And yes, disallowing analytical solutions is rather complicated because once players have an exact solution they can very easily compute a random instantiation of those estimates for any arbitrary sample size (e.g. using binomial distribution properties), which should be impossible to tell apart from actual Monte Carlo simulation results, so I really do not see a good way to effectively disallow those types of solutions. The "good seed" approach has the problem that it will only work for a very specific form of Monte Carlo simulation (other perfectly valid ways to generate your random samples would not benefit from the "good seed" selection, so you are effectively disallowing all forms of Monte Carlo simulations except the very specific one that you have in mind). In any way, just my two cents, and thanks for the very interesting problem!

on 11 Nov 2015 at 19:02

Alfonso Nieto-Castanon submitted a Comment to Solution 775628

I was just trying to figure out what the EvaluateSolution.p code might be doing. Yes, there is some strange behavior where "exact" solutions are not accepted, and sufficiently close random solutions are only accepted for very specific seed values (which would be impossible to guess for players). If possible, I would suggest just to post the actual code in EvaluateSolution or at least explicitly say what it is testing for so players do not have to guess

on 11 Nov 2015 at 17:10

Alfonso Nieto-Castanon submitted a Comment to Problem 1774. Free passes for everyone!

This problem is back to working status. Just for reference a couple of things have changed in this new version: 1) you can now use free passes to solve those pesky Cody problems where the testsuite itself contains some error (i.e. freepasses will work just fine even when the testsuite may contain errors and/or your solution code may not be even run); and 2) you may only use freepass to solve one problem per day (i.e. 24 hours need to pass between the last time you use a "freepass.please" solution to get a passing grade and requesting a new free pass). Let me know if you run into any issues. And @James, unfortunately no Simulink support yet, let me know if you have any ideas on how to tackle that!

on 9 Nov 2015 at 21:22

Alfonso Nieto-Castanon submitted a Comment to Solution 774620

konami ftw!

on 9 Nov 2015 at 19:03

Alfonso Nieto-Castanon submitted a Comment to Solution 773489

100% precision/recall, but using N so no pat in the back for me

on 8 Nov 2015 at 5:15

Alfonso Nieto-Castanon submitted a Comment to Problem 42339. ~(*|/)

see problem 242 for an example of how to disallow the use of specific characters (improving your testsuite is a better way to ask players to "follow the rules" of your problem in Cody)

on 6 Nov 2015 at 17:00