2 ms·
I was thinking along similar lines, like some kind of reinforcement learning model that penalized lines that seem ugly to humans... but probably hard to get eno
by paultopia 9y ago
I was thinking along similar lines, like some kind of reinforcement learning model that penalized lines that seem ugly to humans... but probably hard to get enough humans looking at enough code.
- pmoriarty 9y agoI wonder if well-respected real-world code samples could be used as a training and testing set. For example, one could use a subset of the Linux kernel source code as training, and another (unseen) subset as testing. Highly rated projects on github might work too.
- blt 9y agoAn active learning approach would be cool, where the formatter process a large corpus of code and asks a human operator for advice when it is especially uncertain about the best place to split. Even if training the splitting policy from scratch is too hard, learning would be a good way to establish cost weights on different kinds of rule violations.