This game is played with rocks of 4 colors.
Initially, there are N 1-rock stacks on the ground (N>5). Each stack has a size (number of its rocks) and a color (color of the rock on top of that stack) there is at least one rock of each color in the beginning. At each turn, the player whose turn it is can move a stack of rocks on top of another stack, given the two stacks have either the same size or the same color. so the two stacks $S_1$ and $S_2$ turn into one stack with size [size($S_1$)+size($S_2$)] and the color of whichever stack that was moved on top of the other. The game ends when there is no other move possible and the person who played the last move wins.
edit based on comments: So what's obvious here is that in the final state of the game we will have 1, 2, 3, or 4 stacks remaining (depending on how many colors are left) and creating each stack of size $K$ takes a total of $K-1$ moves throughout the game. So, assuming there are $t$ stacks left in the final state if $N-t$ is odd, the first player wins, and otherwise, the second player wins.
I am looking for a way to find a winning strategy (if there is one)