I think my comments sway dangerously close to answering this question as best as we can, for being a question and answer site based on Game Development and not Law, so I am going to elaborate in an answer.
As a disclaimer, I am not a lawyer. This is not legal advice, and when in doubt, you should always consult a lawyer; but that is the entire point I am trying to make.
Your effectively asking if an algorithm is can be copyrighted. This question has been asked on Quora, with the top answer suggesting that the algorithm is automatically protected by being distributed in source code. It goes on to say that the original created is not protected against others recreating the algorithm using different logic, suggesting that you may be protected by changing the algorithm.
Jon Seymour, programmer, problem solver, procrastinator.
Answered Jan 3, 2016
The expression of an algorithm in a source code file can be copyrighted.
Such rights may allow the rights holder to prevent unauthorised reproduction of particular pieces of source code that embody an algorithm. However, such rights do not pertain to the algorithm itself and so copyright itself does not prevent others creating other expressions of the same algorithm in some other form, such as a different source code file.
I have found further articles that detail how tricky and confusing this can be, including on imranontech, which describes how the author had the assumption that an algorithm could not be copyrighted, and changed their mind after consulting actual legal documentation. It is worth a read, if your interested; he also goes into some case studies of situations where this has come up in court.
Bálint makes an excellent point, though from the opposite perspective:
BTW, since these aren't patented (I'm not sure if you could even patents them) and they're literally 3 to 6 characters long, it's like getting sued by the producer of "Night of the living dead", because your game uses the word zombie – Bálint 3 hours ago
The reason this is an excellent point is because the word zombie was a trademark of Marvel. You quite literally could have been sued for using it. I can only find articles conveying this fact as one of "ten fun facts", or the like, in the limited time I currently have. I may bring this up, later, on Skeptics.
The point I am trying to make is that you should really consult a lawyer
At the end of the day, these are all sources from other people, on the Internet. Likewise, we are all just random people, on the Internet. If you have any doubt, you should consult a lawyer. The reasoning is rather simple; if you can not afford the peace of mind of consulting a lawyer on the matter, you could not afford the repercussions of being sued over your use of the algorithm. In fact, if you are allowed to use this algorithm, The Pokemon Company could still sue you over it. It is the resulting action of the court case that determines whether you have the right to use this algorithm, and you could easily be spending a lot of money fighting the case, before you reach this ultimate decision. Assuming The Pokemon Company finds out, and actually takes action.
Ultimately, it may not be worth it, and that it something you need to decide for yourself. I am not going to be in any serious trouble, if I am wrong. Neither are any of the other users here. You have a lot more invested in this, and considering your comment that you will very likely alter the algorithm, that might very well be the safest bet to make.