• Welcome to Smashboards, the world's largest Super Smash Brothers community! Over 250,000 Smash Bros. fans from around the world have come to discuss these great games in over 19 million posts!

    You are currently viewing our boards as a visitor. Click here to sign up right now and start on your path in the Smash community!

Project M Social Thread Gold

DrinkingFood

Smash Hero
Joined
May 5, 2012
Messages
5,600
Location
Beaumont, TX
I try to imagine it's out of habit and not ignorance. For example I tend to not end my last sentence with a period
That's super common, I tend to do it too. Period as punctuation is good for separating sentences, but also sees a lot of use for indicating finality of a statement. The logic to me is when I don't need to drive a point home, or don't need to separate from the next sentence, I just don't use the period
 

PMS | LEVEL 100 MAGIKARP

Hologram Summer Again
Joined
Jan 16, 2013
Messages
3,303
Location
Tri Hermes Black Land

Helsong

Smash Ace
Joined
Mar 31, 2015
Messages
899
Location
Helsy Helsy Helsy
I have to make a splay tree and turn it in by midnight tomorrow. I have pretty much no progress on it and figuring out how to rotate branches of the tree is ****ing me up


****
Oooh, splay trees. Are you having issues visualizing it, or just coding in the rotation? I might be able to help.

I suppose another question to ask is: Do you understand AVL trees?
 
Last edited:

standardtoaster

Tubacabra
Joined
Nov 26, 2009
Messages
9,253
Location
Eau Claire, Wisconsin
It's the coding part mostly. I'm not exactly sure how to go about finding whether to rotate left/right and what to do with the child or parent node(s). I have a site that has visualizations for binary trees, splay trees, and AVL trees. I actually get 50pts extra credit if I make an AVL tree for this too lol
 

Helsong

Smash Ace
Joined
Mar 31, 2015
Messages
899
Location
Helsy Helsy Helsy
It's the coding part mostly. I'm not exactly sure how to go about finding whether to rotate left/right and what to do with the child or parent node(s). I have a site that has visualizations for binary trees, splay trees, and AVL trees. I actually get 50pts extra credit if I make an AVL tree for this too lol
Wikipedia has a decent visualization of Splay trees and how you rotate to the top. It also has code if you scroll down.

Honestly, I always found it easier to get AVL Trees first, and then go into Splay Trees. Mostly because AVL Tree rotation is how you can go into understanding the way you rotate accessed elements up to the top. Do you understand how to code that first? It'll make it way easier. Otherwise, here's the basic logic:
You're going to need to know if the element you're accessing is the left child or the right child of it's parent, and if the parent is the root. You'll run this check every time you rotate, until you are the root.
So, if your parent is the root, and you're the left child, then you become the root, your right subtree becomes your (original) parent's left child, and your parent becomes your right child. If you're the right child, it's basically flipped. Your left subtree becomes your parent's right, and your left becomes your parent. And you're done, because you are now at the top.
If your parent is not the root, then you need to look at your parent's parent(grandparent).
This is where **** gets real.
Now you've got two scenarios to consider.
zig-zig is where it's just a straight line. You're the right child, and your parent is a right child, or you're the left child of a left child, etc. This is the more complex version. You have to first rotate(using the logic above) your parent and your grandparent, and then rotate on the edge between you and your parent(again, using the above logic). So, if it's a zig-zig going left(you're the left child of a left child), your parent's right subtree becomes your grandparent's left, and your grandparent becomes your parent's right child. You're still your parent's left child. Then you rotate again, making your right child/subtree your parent's left, and making your parent your right child.
zig-zag is where you are the left child of a right child, or the right child of a left child. This is a ton easier, as it's just a AVL single rotation.

And you're basically doing this over and over again until your accessed element gets to the top.
I'd honestly recommend doing an AVL tree first, but if you're pressed for time/have an easier time understanding splay trees over AVL trees, then just do the splay tree.

So, make sure your node structure has a pointer to a left and right child as usual, but also a pointer towards the parent, as that's the only way you're gonna be able to make these algorithms work.
Hope this wall of text helps at all. It's always a bit tough for me to help people through text/emails, as opposed to just drawing them a visual in person.
 
Last edited:

Comeback Kid

Smash Champion
Joined
Dec 25, 2009
Messages
2,431
Location
Parts Unknown
Mugen is the worst...... yet can be used to turn out a great game like Hyper Dragonball Z.


So it has to be entirely on the content creator to make it work.
 

PootisKonga

Smash Ace
Joined
Oct 4, 2014
Messages
842
Location
Medford, NY
The only things I recall about Mugen are the overpowered things like Chuck Norris, Nightmare SSJ4 Broly, Omega Tom Hanks, and Hyper(?) Akuma

I also remember seeing a Stupid Little Drill Tank ditto
 

standardtoaster

Tubacabra
Joined
Nov 26, 2009
Messages
9,253
Location
Eau Claire, Wisconsin
Wikipedia has a decent visualization of Splay trees and how you rotate to the top. It also has code if you scroll down.

Honestly, I always found it easier to get AVL Trees first, and then go into Splay Trees. Mostly because AVL Tree rotation is how you can go into understanding the way you rotate accessed elements up to the top. Do you understand how to code that first? It'll make it way easier. Otherwise, here's the basic logic:
You're going to need to know if the element you're accessing is the left child or the right child of it's parent, and if the parent is the root. You'll run this check every time you rotate, until you are the root.
So, if your parent is the root, and you're the left child, then you become the root, your right subtree becomes your (original) parent's left child, and your parent becomes your right child. If you're the right child, it's basically flipped. Your left subtree becomes your parent's right, and your left becomes your parent. And you're done, because you are now at the top.
If your parent is not the root, then you need to look at your parent's parent(grandparent).
This is where **** gets real.
Now you've got two scenarios to consider.
zig-zig is where it's just a straight line. You're the right child, and your parent is a right child, or you're the left child of a left child, etc. This is the more complex version. You have to first rotate(using the logic above) your parent and your grandparent, and then rotate on the edge between you and your parent(again, using the above logic). So, if it's a zig-zig going left(you're the left child of a left child), your parent's right subtree becomes your grandparent's left, and your grandparent becomes your parent's right child. You're still your parent's left child. Then you rotate again, making your right child/subtree your parent's left, and making your parent your right child.
zig-zag is where you are the left child of a right child, or the right child of a left child. This is a ton easier, as it's just a AVL single rotation.

And you're basically doing this over and over again until your accessed element gets to the top.
I'd honestly recommend doing an AVL tree first, but if you're pressed for time/have an easier time understanding splay trees over AVL trees, then just do the splay tree.

So, make sure your node structure has a pointer to a left and right child as usual, but also a pointer towards the parent, as that's the only way you're gonna be able to make these algorithms work.
Hope this wall of text helps at all. It's always a bit tough for me to help people through text/emails, as opposed to just drawing them a visual in person.
That helps a lot, thanks. If I need more help tonight would you mind if I contacted you on skype or something?
 

steelguttey

mei is bei
Joined
Mar 25, 2014
Messages
1,674
is there any requirements to get the pms tag or do you just have to like anime alot and ****post

because if so i think im a prime candidate
 

Helsong

Smash Ace
Joined
Mar 31, 2015
Messages
899
Location
Helsy Helsy Helsy
That helps a lot, thanks. If I need more help tonight would you mind if I contacted you on skype or something?
I'd love to help some more, but I do have other plans tonight, along with my own irritating code to slog through :(. You can send me a pm on here and I'll get to it when I can, but I really can't make any guarantees.

In the meantime, a few resources that might help you get started, or just help with some more common issues:
Wikipedia AVL Trees: http://en.wikipedia.org/wiki/AVL_tree
Wikipedia Splay Trees: http://en.wikipedia.org/wiki/Splay_tree
Tree Rotations(very useful): http://en.wikipedia.org/wiki/Tree_rotation

My biggest issues when I did Splay Trees was simply having a good way to do the rotations without it getting too messy. Make sure you test on smaller sized trees first(height 2 or 3), and then scale up. If your algorithm fails on smaller trees, make sure you're changing up your pointers properly. The #1 place I see mistakes made is in the rotations themselves, and on testing for cases. Write out your logic, draw out your trees, and step through your algorithm by hand.
 
Last edited:

Kaye Cruiser

Waveshocker Sigma
Joined
Aug 11, 2009
Messages
8,032
NNID
KayeCruiser
Switch FC
0740-7501-7043


...I just watched the first episode of Ninja Slayer by Trigger.


That has to be the single worst piece of Japanese "animation" that I have ever watched in my life.

And I've watched Blazblue Alter Memory. And other far worse things.
 

Hinichii.ez.™

insincere personality
Joined
Nov 2, 2013
Messages
4,290
NNID
hinichii
3DS FC
2423-5382-7542
dont you hate it, when your dog starts to like certain human foods... and it gets to the point where he wont eat your table scraps, so you look like a scrub when you bend over to pick up all that food you threw on the ground
 

Lizalfos

Smash Master
Joined
Dec 30, 2013
Messages
3,483
Location
Greenville, SC
dont you hate it, when your dog starts to like certain human foods... and it gets to the point where he wont eat your table scraps, so you look like a scrub when you bend over to pick up all that food you threw on the ground
My dog is fed as well as me. Sometimes my mom brings a burger home, and I say, "Thanks for getting food". Then she tells me its for the Dog, wtf.

Now hug your new PMS brother steelguttey<3
 

Hinichii.ez.™

insincere personality
Joined
Nov 2, 2013
Messages
4,290
NNID
hinichii
3DS FC
2423-5382-7542
My dog is fed as well as me. Sometimes my mom brings a burger home, and I say, "Thanks for getting food". Then she tells me its for the Dog, wtf.

Now hug your new PMS brother steelguttey<3
he aint real pms
his sh*t post are on a third grade level
 

Lizalfos

Smash Master
Joined
Dec 30, 2013
Messages
3,483
Location
Greenville, SC
Your parents do hate you, you weren't kidding.
I think it is because the dog can't not eat people food now. I want to leave him in the laundry room with dog food for a 24 hour period, but that isn't going to happen.
She bought me and my sister bottles of black cherry soda randomly yesterday. My mom is cool if everything else is cool, but my step dad seems controlling. When she is on the phone, he has her put it on speaker so that he can jump in when he wants. Same things if she comes to my room to talk to me, he is probably lurking in the hallway waiting to jump in.
he aint real pms
his sh*t post are on a third grade level
The better ****posters here don't have tags, excluding Tink-er. PMS members are **** posters, not ****posters.
You're both not even 1:1 or higher, though.
ez posts outside of the PMS free like safezone lmao
 
Last edited:

steelguttey

mei is bei
Joined
Mar 25, 2014
Messages
1,674
i swear the first post on the 2000th page on this ****ing thread will be mechwarrior with a ****ing forehead wiping pic and were all gonna be ****in pissed
 
Top Bottom