Please read the new rule regarding the restriction on the use of AI tools. ×

canine's blog

By canine, history, 3 months ago, In English

there have been quite a few attempts to create language models able to solve competitive programming problems. i'm nowhere near this ambitious, but i think providing quality problem analyses by providing more detailed tags compared to what Codeforces currently offers, showing who people took which approach to solving a problem, and creating problem embeddings to enhance problem search (e.g. capable of finding a problem similar to the intersection of two problems) could have a more positive direct impact on competitive programmers than behemoths like AlphaCode. don't you wish you knew what proportion of submissions to a problem used push-relabel vs ford-fulkerson, or whether a problem tagged data structures used lazy segment trees or simply a fenwick tree?

if you think this is a good idea -- i might be going insane with tunnel vision because i've spent a lot of time on this concept -- you can help me by annotating your own solutions on my site. if you find anything missing there (tags or features), or have other concerns please let me know. i've trained an AST-based ~30M BERT-like transformer on masked language modeling and just need some data to fine-tune it to predict specific tags. if just 50 people annotate 20 submissions, that would definitely be enough! this will also enhance the embedding, helping it encode salient aspects of approaches to a problem. i've tried using ChatGPT for this task, and the results were pretty bad. i think better, or at least human, data could fix this.

tldr: please consider donating data to my little project here

thank you! :>)

  • Vote: I like it
  • +50
  • Vote: I do not like it

»
3 months ago, # |
  Vote: I like it 0 Vote: I do not like it

i was submitting some solutions and noticed some tags missing (which we need to choose)

Two Pointers Maps Priority Queue Sorting with Custom Comparators There are many ways of dp — Only few are listed

Maybe these additions might help !!

  • »
    »
    2 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    thanks for your feedback! i added some more dp tags and two pointers, but i don't think STL container usage or sorting w/ custom comparators should be input by a human, since they can easily be automatically identified from source code / AST.

»
2 months ago, # |
  Vote: I like it 0 Vote: I do not like it

orz

»
2 months ago, # |
  Vote: I like it 0 Vote: I do not like it

The "why are you even here" thing should only appear once I think.

  • »
    »
    2 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    you are absolutely right! should be fixed

»
2 months ago, # |
Rev. 2   Vote: I like it +11 Vote: I do not like it

Nice project! I am considering tagging some of my own solutions (and hopefully revisiting some tricks I have used in the past), but I got the following error:

Spoiler

Edit: seems to have been because a round was ongoing during that time. Maybe CF becomes completely different when there is a round going on?

  • »
    »
    2 months ago, # ^ |
      Vote: I like it +5 Vote: I do not like it

    thanks -- i got blocked by cloudflare and thats probably why. i added some throttling to respect CF's ratelimit, should be better now

»
2 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Just a random suggestion, but wouldn't it be better to create embeddings over editorials? Like embeddings are anyways clustered over a 3D space by virtue of their existence, so wouldn't it be better to create embeddings of edi's and then label clusters using the tag data you're collecting?

»
2 months ago, # |
  Vote: I like it 0 Vote: I do not like it

usernames which contain periods are perceived as invalid

  • »
    »
    2 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    thanks for pointing that out, fixed!

»
2 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Could you add the tags for Chinese Remainder Theorem, or perhaps for extended Euclids?

  • »
    »
    2 months ago, # ^ |
      Vote: I like it +5 Vote: I do not like it

    whoops, i don't know how i missed those! added, thanks