Ledenel / auto-white-reimu

a mahjong library aimed to implement mahjong AIs by imitating white reimu -- a excellent mahjong player.
GNU General Public License v3.0
9 stars 1 forks source link

Notes on learning how to contribute to this project #3

Open lance6716 opened 5 years ago

lance6716 commented 5 years ago

Here's TODOs collected from comments below:

Very useful and a good change to learn Python, thanks owner.

Now I'm reading the source code, here I wrote potential development.

Ledenel commented 5 years ago

Thanks for your contribution! I 've made these two tools work right now. Here's my planning:

And for contribution, a contribution guide is required (Maybe a issue template/pull request template, but I've no idea about how to do that).

I'll remain this issue open for discussion. Any crazy ideas are welcomed!

Ledenel commented 5 years ago

For

class Tile and TileSet use @total_ordering, according to official doc, should evaluate if it's the bottleneck of the performance.

I've benchmarked with cProfile and found that main bottle neck is about manipulate and create TileSet(Counter)s. the operator is mainly heavily used in sorting, so I think that le, eq and ne is enough.

For

check if collections.Counter could sorted by key internally when print, so we don't need TileSet.re_sort()

Counter(include normal dicts) after Python 3.7 is guaranteed that keys will preserved order of insertion. it's not the order we needed (if insert 3m first, 2s later, 1m last, the order will be 3m2s1m). so printing needs resort.

Ledenel commented 5 years ago

By the way, Interantionalized document is needed, but I've no idea of how to do that.

lance6716 commented 5 years ago

we should first decide which doc framework to use, in fact I'm not familiar with python technology stacks, so don't rely on me🤔

Ledenel notifications@github.com 于 2019年2月4日周一 22:33写道:

By the way, Interantionalized document is needed, but I've no idea of how to do that.

  • Add zh-CN and en-US documentation support.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Ledenel/auto-white-reimu/issues/3#issuecomment-460270302, or mute the thread https://github.com/notifications/unsubscribe-auth/ABnIprfIxNxZxSmdXjsdI9ipdKrVoapIks5vKES6gaJpZM4agDx2 .