Search found 74 matches

by MindTheGap
Sun Jun 28, 2009 6:07 pm UTC
Forum: Coding
Topic: Python Classes Help
Replies: 12
Views: 1594

Python Classes Help

I've written a simple class: FILES = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h'] RANKS = ['1', '2', '3', '4', '5', '6', '7', '8'] class Location: def __init__(self, x, y): self.x, self.y = x, y def getAlgNot(): notation = '' notation += FILES[self.x-1] + RANKS[self.y-1] return notation if __name__ == '...
by MindTheGap
Fri Apr 10, 2009 11:33 pm UTC
Forum: General
Topic: SO MOTHEREFFIN HAPPY Thread :)
Replies: 527
Views: 64613

Re: SO MOTHEREFFIN HAPPY Thread :)

.
by MindTheGap
Mon Mar 23, 2009 8:44 pm UTC
Forum: Coding
Topic: Xkcd coding contest administratorium thread
Replies: 142
Views: 13334

Re: Xkcd coding contest?

Sounds fun. I'll definitely participate if this happens.
by MindTheGap
Sat Mar 21, 2009 2:37 am UTC
Forum: General
Topic: Post your Start Menu (and various Linux analogies)!
Replies: 38
Views: 3553

Re: Post your Start Menu (and various Linux analogies)!

Holy fuck you have a huge amount of a screen space wasted on useless toolbars. Agree'd. Here's my Mac dock. http://img12.imageshack.us/img12/7232/picture1icj.png From left to right: Finder Quicksilver Firefox Firstclass TextEdit Bean iTunes Skype Virtual DJ Ableton live Textmate Terminal Transmissi...
by MindTheGap
Fri Mar 20, 2009 2:32 am UTC
Forum: General
Topic: REALLY Annoying Misconceptions
Replies: 4059
Views: 379899

Re: REALLY Annoying Misconceptions

Misconception: Because I am Asian, I am good at every academic subject. Seriously, I hate this. Everyone in chemistry always asks me questions they don't understand. "Just ask [my name]. He'll know what to do!" And then I end up feeling stupid when I don't know the answer and everyone gets...
by MindTheGap
Wed Mar 18, 2009 8:38 pm UTC
Forum: Movies and TV Shows
Topic: Pineapple Express, Role Models, Similar Movies...
Replies: 7
Views: 2491

Pineapple Express, Role Models, Similar Movies...

I'm really looking for movies similar to Pineapple Express, Role Models, Zack and Miri, and so on. Kinda like the rated R humor.

Any suggestions?
by MindTheGap
Wed May 07, 2008 2:08 am UTC
Forum: Forum Games
Topic: Type xkcd with your forehead
Replies: 200
Views: 38401

Re: Type xkcd with your forehead

dxjklcfed

If you look closely:
dxjklcfed
by MindTheGap
Mon May 05, 2008 1:38 am UTC
Forum: Science
Topic: Solutes and Solvents
Replies: 23
Views: 6148

Re: Solutes and Solvents

w00t. Thanks. I appreciate it. What are three things that will increase the dissolving rate of a solute? Here, you are straying away from "help me with this unreasonable/arbitrary question" and more towards "give me the answer to a question that I should be able to look up in a textb...
by MindTheGap
Mon May 05, 2008 1:21 am UTC
Forum: Science
Topic: Solutes and Solvents
Replies: 23
Views: 6148

Re: Solutes and Solvents

w00t. Thanks. I appreciate it.

What are three things that will increase the dissolving rate of a solute?
by MindTheGap
Sun May 04, 2008 11:16 pm UTC
Forum: Science
Topic: Solutes and Solvents
Replies: 23
Views: 6148

Re: Solutes and Solvents

Benzie Benzene - Solvent. Benzene is an aromatic nonpolar solvent. Carcinogenic, so you wont generally see it in high school labs. Thank you very much. And I did make a typo. It should be Benzine. Not Benzie or Benzene. So is Benzine the same as Benzene? And the next part of the worksheet I have no...
by MindTheGap
Sun May 04, 2008 9:36 pm UTC
Forum: Your art and links
Topic: They made me do it (NSFW)
Replies: 4
Views: 1929

Re: They made me do it (NSFW)

What the...
by MindTheGap
Sun May 04, 2008 9:31 pm UTC
Forum: Science
Topic: Solutes and Solvents
Replies: 23
Views: 6148

Solutes and Solvents

Hey, this is from one of my chemistry worksheets. I dont know how to tell which ones on the list are solutes and which are solvents. Is there some kind of way you can find out by looking at the name and what it is? Gasoline Salt Oil Potassium Chlorate Turpentine Water Calcium Acetate Alcohol Cornsta...
by MindTheGap
Fri May 02, 2008 1:39 am UTC
Forum: Coding
Topic: Mastermind AI
Replies: 60
Views: 8040

Re: Mastermind AI

So, do you think I did this right? #include <iostream.h> No, I don't think you did it right. There is no such thing as "iostream.h" in the modern C++ standard. You want 'iostream', with no extension, and you want to learn to love and respect the std:: namespace. You also want to use std::...
by MindTheGap
Thu May 01, 2008 11:50 pm UTC
Forum: Coding
Topic: Mastermind AI
Replies: 60
Views: 8040

Re: Mastermind AI

Thank you for not writing it for me. You made me understand what you were doing more.
by MindTheGap
Thu May 01, 2008 11:11 pm UTC
Forum: Coding
Topic: Mastermind AI
Replies: 60
Views: 8040

Re: Mastermind AI

Jesus Fucking Christ, my code makes no sense and this thing is due in 5 hours.

...This might be asking for a lot, but do you think you could just write calcElim in c++?
by MindTheGap
Thu May 01, 2008 11:01 pm UTC
Forum: Coding
Topic: Mastermind AI
Replies: 60
Views: 8040

Re: Mastermind AI

Sweeet
by MindTheGap
Thu May 01, 2008 9:58 pm UTC
Forum: Coding
Topic: Mastermind AI
Replies: 60
Views: 8040

Re: Mastermind AI

Puck wrote:Score the guess as the sum for all counters of i*(n-i) where i is the number in the counter, and n is the number of possibilities remaining

I don't understand this sentence. Could you explain it in other terms? Thanks.
by MindTheGap
Thu May 01, 2008 8:50 pm UTC
Forum: Coding
Topic: Mastermind AI
Replies: 60
Views: 8040

Re: Mastermind AI

a
by MindTheGap
Thu May 01, 2008 7:36 pm UTC
Forum: Coding
Topic: Mastermind AI
Replies: 60
Views: 8040

Re: Mastermind AI

Ok. Holy ####. Major breakthrough. I got it down to average of 5.4 ish. I can't be sure because its an average of 10 but it is slow as shit. I think I understand your idea of creating the array of xcords and ycords. So, at the beginning, I score each element in all against each other element in all ...
by MindTheGap
Thu May 01, 2008 7:24 pm UTC
Forum: Coding
Topic: Mastermind AI
Replies: 60
Views: 8040

Re: Mastermind AI

Thank you for pointing that out about my all[i][4] == 4 problem.

Does everything else look okay?
by MindTheGap
Thu May 01, 2008 6:24 pm UTC
Forum: Gaming
Topic: Cybernations
Replies: 41
Views: 9058

Re: Cybernations

Yay, I love CN. I'm in the MCXA.
My awesome nation:
http://cybernations.net/nation_drill_di ... _ID=121096
by MindTheGap
Thu May 01, 2008 1:55 pm UTC
Forum: General
Topic: What is your name an anagram of?
Replies: 384
Views: 54614

Re: What is your name an anagram of?

My name has awesome anagrams

Spartan Hole -- which sort of reminds me of that huge pit in 300.
Another Slap -- hit my baby one more time!
Earshot Plan -- sounds like some death metal band...
Stale Orphan -- just weird...I didn't know orphans could go stale!
by MindTheGap
Wed Apr 30, 2008 10:58 pm UTC
Forum: Coding
Topic: Help me with random numbers
Replies: 14
Views: 2041

Re: Help me with random numbers

Maybe include <ctime> and <cstdlib> and put srand(time(0)); as the first line in your main(). So: #include <iostream> #include <ctime> #include <cstdblib> using namespace std; int main() { srand(time(0)); int x = rand() % 10; cout << x << endl; return 0; } that will give you a random number each time.
by MindTheGap
Wed Apr 30, 2008 9:51 pm UTC
Forum: Coding
Topic: Mastermind AI
Replies: 60
Views: 8040

Re: Mastermind AI

Ok, I'll try and explain what all the functions do: generateAll Creates a 5040 x 5 array (named 'all') of all possible oblios and a flag of 0 or 1. (1 indicates it is a possible guess and 0 means it cannot be possible). So it would look something like this at the begining: 01231 01241 01251 01261 .....
by MindTheGap
Wed Apr 30, 2008 5:21 pm UTC
Forum: Coding
Topic: Mastermind AI
Replies: 60
Views: 8040

Re: Mastermind AI

a
by MindTheGap
Wed Apr 30, 2008 2:14 am UTC
Forum: Coding
Topic: Mastermind AI
Replies: 60
Views: 8040

Re: Mastermind AI

Honestly, I tried to implement this, but I just couldn't get it working...

Should I post code?
by MindTheGap
Thu Apr 24, 2008 10:55 pm UTC
Forum: Coding
Topic: Mastermind AI
Replies: 60
Views: 8040

Re: Mastermind AI

Okay, let's say we're going to guess 1248. if 1234 is the truth, we will be able to cross X answers off our possibles list. if 1258 is the truth, we can cross off Y answers. if 1274 is the truth, we can cross off Z answers. ... and so on. We can explicitly calculate X, Y, and Z by using the oracle ...
by MindTheGap
Wed Apr 23, 2008 10:43 pm UTC
Forum: Coding
Topic: Mastermind AI
Replies: 60
Views: 8040

Re: Mastermind AI

Wow, today I go to class and start coding away, thinking I have it down, but really I don't think I understand it. What do you mean by this: When you call it from Score, you use the prospective guess whose score you're trying to calculate. Can you explain that sentence for me? And can you look at my...
by MindTheGap
Tue Apr 22, 2008 10:50 pm UTC
Forum: Coding
Topic: Mastermind AI
Replies: 60
Views: 8040

Re: Mastermind AI

Ok thank you. I will implement this tomorrow.

My teacher said you may only gues Oblio numbers, so 1122 or 0000 would not work.
by MindTheGap
Tue Apr 22, 2008 11:05 am UTC
Forum: Coding
Topic: Mastermind AI
Replies: 60
Views: 8040

Re: Mastermind AI

Ok thank you!!!

One question: In your Score function, you have: IF ORACLE(guess, truth) != ORACLE(guess, POSSIBILITY). Which value is considered guess and which is considered truth? Is guess the last guess we made?
by MindTheGap
Sun Apr 20, 2008 10:08 pm UTC
Forum: Coding
Topic: Mastermind AI
Replies: 60
Views: 8040

Re: Mastermind AI

thanks
by MindTheGap
Sat Apr 19, 2008 12:35 am UTC
Forum: Coding
Topic: Mastermind AI
Replies: 60
Views: 8040

Re: Mastermind AI

I sort of get it...i think. Can you try putting it in basic pseudo-code or even real code? It might help me to understand it better that way.
Thanks.
by MindTheGap
Fri Apr 18, 2008 9:28 pm UTC
Forum: Coding
Topic: Mastermind AI
Replies: 60
Views: 8040

Re: Mastermind AI

Ok I got it working perfectly with an average of 5.5 guesses.

I want to make it better though. As of right now, my GenerateAGuess just picks a random guess from the possible ones. How do I choose a guess logically out of all the possible ones?
by MindTheGap
Thu Apr 10, 2008 1:30 am UTC
Forum: Coding
Topic: Mastermind AI
Replies: 60
Views: 8040

Re: Mastermind AI

Ok. I have a problem with it.

In a seperate file, I created a secret number for my program to guess. I called the function, gave it feedback and counted how many guesses it took. The number of guesses was infinity. It just guess 0123 over and over and over again. Is there something I did wrong?
by MindTheGap
Tue Apr 08, 2008 10:55 pm UTC
Forum: Coding
Topic: Mastermind AI
Replies: 60
Views: 8040

Re: Mastermind AI

Note about my headers: If you try using <iostream> instead of <iostream.h> I get an error. It is an old compiler that my school uses. On topic: I haven't tested this yet . I plan to, but do you see anything wrong with the actual structure of the code? Does my UseTheFeedback function make sense or am...
by MindTheGap
Mon Apr 07, 2008 11:12 pm UTC
Forum: Coding
Topic: Mastermind AI
Replies: 60
Views: 8040

Re: Mastermind AI

So, do you think I did this right?
by MindTheGap
Mon Apr 07, 2008 1:35 am UTC
Forum: Coding
Topic: C++ Array
Replies: 4
Views: 1400

C++ Array

I have an multi-dimensional array of size 100x4, (to hold 100 four digit integers where 0 can be the first digit). At a point in my program, I have a number n where n is between 0 and 100, and n rows of the array are filled and the rest are null. My question is, how do I find out how many rows are n...
by MindTheGap
Fri Apr 04, 2008 1:37 am UTC
Forum: Coding
Topic: Mastermind AI
Replies: 60
Views: 8040

Re: Mastermind AI

How do I calculate how many possibilities each guess would eliminate?
by MindTheGap
Wed Apr 02, 2008 11:09 pm UTC
Forum: Coding
Topic: Mastermind AI
Replies: 60
Views: 8040

Re: Mastermind AI

Thank you. I understand it now.

One question though:
Say you guess 0123 and get back (1,2) and have an array full of the numbers who also would give back (1,2). Which one would you guess for the next guess?
by MindTheGap
Wed Apr 02, 2008 2:38 am UTC
Forum: Coding
Topic: Mastermind AI
Replies: 60
Views: 8040

Re: Mastermind AI

So I guess '0123' first, and lets say I get the ordered pair of (1,2).
I then go through each possible number and see which ones yield a (1,2)?

How would I know if 6758 yields a (1,2) if there are no common digits with 0123?


Thanks, BTW, you are very helpful.

Go to advanced search