Run a loop to initialize all of the message variables to "" in the create event of that object.
- Game Maker Community
- → Viewing Profile: Posts: xshortguy
xshortguy
Member Since 09 Aug 2006Offline Last Active Today, 02:12 AM
About Me
https://yoyogames.mojohelpdesk.com/ - Game Maker Software Help
http://www.andy-robe...net/misc/latex/ - LaTeX Guide
http://www.gmlscripts.com/ - Game Maker Language Resource
http://gmc.yoyogames...howtopic=417888 - Novice and Intermediate User FAQ.
http://gmc.yoyogames...howtopic=451383 - Icuurd12b42's Tool Chest
http://www.khanacademy.org/ - Resource for Learning Mathematics and other things.
Community Stats
- Group Global Moderators
- Active Posts 4186
- Profile Views 14622
- Member Title GMC Member
- Age 24 years old
- Birthday July 30, 1988
-
Gender
Male
-
Location
Cleveland Ohio
-
Interests
I am a graduate of Ohio State U. In Mathematics. I am currently studying to become an Associate of the Society of Actuaries (ASA).
Play League of Legends:
http://signup.leagueoflegends.com/?ref=4d0cb1b1d9ded754627679 -
Version
GM:Studio
Latest Visitors
Posts I've Made
In Topic: For Loop Not Working?
19 May 2013 - 12:47 PM
In Topic: Pvsnp Problem Example - Solved In Game Maker
13 May 2013 - 12:02 AM
Don't use an ini file. Use a csv file: just parse get the string up to each comma.
In Topic: 0^0=1? Or Not? -0 Exists Or Not?
12 May 2013 - 11:56 PM
That's not a continuous function. Try differentiating it and you'll see what I mean.
You can't use the rule d(a^f(x)) = a^f(x) * ln(a) * f'(x) because that rule is specifically only for positive numbers. In fact, you'll see that that function is identically the zero function, since (x^2 + 1)/(x^4 + 1) > 0 for all x. So the derivative of the function is just 0 everywhere.
In Topic: Pvsnp Problem Example - Solved In Game Maker
12 May 2013 - 03:28 PM
I wanted to look at your program, but the fact that I have to type in each student's name is a little over the top.
Instead, you should provide a utility to load a list of names from a document, and a list of incompatible pairs (comma delimited file).
I'll try and provide some insight on the problem, though:
- The list of incompatible students will typically greatly exceed the number of applicants. For example, for 400 applicants, we can have at most (400 choose 2) = 400!/[(398!)2!] = 400 * 399 / 2 = 78900 incompatible pairs.
- Assuming that we have half of those as incompatible pairs (39900), generating a list of 100 people involves that, for each person, we loop through all of those incompatible pairs to check to see if they are allowed to be included on the same list. We can choose the first person freely. The second person potentially cannot be paired with the first, the five person potentially cannot be compared with the first four, and so on. So for each pair, we have to check 39900 different combinations to be guaranteed to check.
- The number of pairs that you will have to check for a group of 100 students is 99 + 98 + ... + 2 + 1 = 99 * 98 / 2 = 4851 . So in the best case scenario, we have to do 39900 * 4851 different checks just to build a list from the first 100 students. If that's not successful, then we have to repeat the entire process of checking 100 students for another pair. Obviously you can do less checks if you find an incompatible pair early, but for those that are OK, you can't avoid these checks.
- Of course, we can cut down on operations by picking a new student if they aren't compatible on the existing running list that we have, since the goal is to come up with only one list. But even in this case there's no guarantee that we'll be able to generate a list with those first few students (if the first student is incompatible with every other student, then the running list will require a complete run-through in order to tell that (s)he won't be on the list.)
In Topic: Math Noob Needs A Little Help
11 May 2013 - 01:39 PM
Taking a list of numbers and hoping to find a function for it is often a bad idea. (I can find a function that fits all of those points individually, but the in-between behavior is not what you would want it to be.)
Instead, find a function with some nice properties that behave the way you want it to. (One obvious property is that the function should always be increasing as the input increases.)
I'd recommend sticking to lines and quadratic equations. See a full discussion here:
- Game Maker Community
- → Viewing Profile: Posts: xshortguy
- Privacy Policy
- GMC Rules and Forum Rules ·



Find content
