Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How difficult do you think it would be to create a C# version of Ebisu? #28

Closed
rs-mobitech opened this issue May 28, 2020 · 4 comments
Closed

Comments

@rs-mobitech
Copy link

I have a platform that uses C# so it's a problem for me that there's no C# version. Do you have any ideas how difficult it would be to port the code to C#? Are there any obstacles such as the availability of libraries that you can think of?

@fasiha
Copy link
Owner

fasiha commented May 28, 2020

Not hard! Look at https://github.com/fasiha/ebisu-java as your guide, it implements the core algorithm and only imports these two tiny packages that I wrote for specific needs:

If you already have libraries that do these things, feel free to use them, but if not, both should be straightforward to port to C# also!

Please let me know when you finish and I will be most happy to make a note of it on the Ebisu readme. Also let me know if you run into problems or need help testing (the Java unit test shows you how to verify correctness against the Python implementation, via a JSON file).

One side note—this Python repo implements Ebisu 2.0, which has the new feature where updateRecall takes integer arguments instead of binary (see Changelog), whereas the Java implementation still is the Ebisu 1 algorithm. If you really, really want to port the 2.0 algorithm to C#, and not the 1.0, let me know and I'll update the Java version to 2, hopefully sometime this week 😓?

@fasiha
Copy link
Owner

fasiha commented May 28, 2020

Actually, another small note—I'm a beginner at Java so I may have over-engineered the interfaces and the classes 😅. This Python repo for example just uses 3-element arrays to represent Ebisu models. I'll leave it to you how to best design the API for C# 😁.

@fasiha
Copy link
Owner

fasiha commented May 28, 2020

Oh, in case it helps, this one-file Go implementation of the entire Ebisu 1.x algorithm might be helpful too:

https://github.com/ap4y/leaf/blob/master/ebisu.go

They have some extra stuff at the top of the file but the majority of the file is a straightforward and legible port of the Python and JavaScript implementations, without the OOP obfuscation of my Java attempt.

@fasiha
Copy link
Owner

fasiha commented Aug 29, 2020

As mentioned in the other repo (fasiha/ebisu-java#8), a C# implementation is available:

https://github.com/nikhildpardasani/Ebisu-CSharp

Feel free to reopen this with any questions!

@fasiha fasiha closed this as completed Aug 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants