From 27b2270e896fe59bb1b6b29079daa62ae957e2b3 Mon Sep 17 00:00:00 2001 From: Josh Kutsko Date: Sun, 14 Feb 2016 22:10:47 -0800 Subject: [PATCH 1/2] first commit for assignment, wrote basic idea for first dsl --- free-1.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/free-1.md b/free-1.md index 0b71de2..5d66592 100755 --- a/free-1.md +++ b/free-1.md @@ -1,5 +1,7 @@ # Free project 1 +DOTA 2 Balance checker/designer + ## The user and a language This section describes who the project would serve and why a language might be a good way to meet their needs. From 154ed1ffac0807ff02e3451495fdf561af43052b Mon Sep 17 00:00:00 2001 From: Josh Kutsko Date: Tue, 16 Feb 2016 02:27:54 -0800 Subject: [PATCH 2/2] probably done --- free-1.md | 33 +++++++++++++++++++++++++++++++-- free-2.md | 25 +++++++++++++++++++++++++ free-3.md | 17 +++++++++++++++-- no-computer.md | 12 ++++++++++++ 4 files changed, 83 insertions(+), 4 deletions(-) diff --git a/free-1.md b/free-1.md index 5d66592..fca38ae 100755 --- a/free-1.md +++ b/free-1.md @@ -1,6 +1,5 @@ # Free project 1 -DOTA 2 Balance checker/designer ## The user and a language This section describes who the project would serve and why a language might be a @@ -12,34 +11,57 @@ _What need is met by your idea? Who are you helping? What is that person's experience like now? What would their experience be like if you could help them?_ +This DSL would have two main user bases: people who play DOTA 2, and people who are trying to develop and test new heroes (characters in the game) and items for the game. Ideally, the second group would be a subset of the first group, since to use the tool would require a good amount of knowledge of the game. The idea is to provide an text interface with very low overhead to allow people to test different hero/item combinations, givng stats like damage potential, tankiness, disable duration, etc for these combinations, as well as allowing people to test new heroes/items in the same way. + +I think a language is the best way to accomplish this, as there is already a GUI for it (namely, the game itself in practice mode), but its very slow. To test things, you need to start up the game, and try a bunch of different things, all of which take time. If there were a text interface, you could save an item combination, then just loop over the heroes you want to test and produce output for all of them instantly. Further, if there were a way to save a test set (for example, damage at X level, pushing power, mana usage, farming speed) one could do mass testing using these, without having to worry about forgetting anything. Additionally, having a text interface would let you run this while in game, if there's a quick thing you need to check (you could even pause the game, check something, then unpause). + +DOTA 2 is a very, very hard game. There are 120+ heroes to learn, all with 4+ unique abilities, and over 100 items. As a result, when making balance changes, there are millions of interactions between abilities and items that contribute to its balance, so having a test suite of things to check (like, X hero should do more damage but have less health than Y hero) would help the developers of the game a lot to make sure that a new change doesn't mess things up. To be fair, I'm not sure what their current process looks like, its entirely possible that they already have something like this, but this would help the community be more involved, and have more informed debates about changes. + +Additionally, to just the average user, this could be a great learning tool. If you want to learn how strong a certain hero is against another hero, you could use this to run damage calculations. You could also use this to test different builds (like, if I get X item before Y item, I'll farm faster but be easier to kill). As of now, the way to do this is literally just to play the game. You test different item builds, and try them in the game, most of the time leading to your death as you learn what things work and don't work. This could simoplify that process. ### Why a language? _Why is a DSL appropriate for your user(s)? How does it address the need?_ - +As described above, the need is essentially to provide an interface that lets people test ideas in DOTA 2 quickly and easily. A GUI could work for this, but would effectively just be a GUI on top of a language that's doing all the backend computations. Thus, a first step is to make a DSL for it. Additionally, the language does not need to be turing complete, it can focus entirely on its domain. It might have batch testing and things that make use of more elaborate control flow, but these should all be in the backend. The goal is to make the interface as simple to use as possible. ### Why you? _What excites you about this idea? How did you come up with it?_ +I'm excited about this first and foremost because I play the game, and think it would be awesome to have something like this. I also know lots of people who play the game as well, and would love this. Second, it would be very helpful with respect to the constant debates about things in the game that are always hard to fact-check due to the difficulty of testing these things. I came up with it just by thinking of an interesting domain, and immediately thought of DOTA 2. ### Domain _Describe the project's domain in five words._ +DOTA Hero/Item Balance Testing ### Interface (syntax) _How might the user interact with the language? What does programming look like? Why is this the right way to interact with the problem domain?_ +The user would interact with this language just by writing scripts in either the shell, or a text editor. I'm imagining commands like: +Hero {item1, item2, item3, item4, item5, item6} level 15; +printing out the relevant stats for that hero. The core issue seems to be text or GUI as the core interaction. I claim that text is probably faster, as you could much mroe easily copy and paste the same 6 items into different heroes, rather than having to reselect everything every time. Text makes things like standard batch testing much easier than a GUI on its own. ### Operation (semantics) _What might happen when a program runs? How does a program interact with the user? What kinds of errors might occur, and how might they be communicated to the user?_ +I sort of answered this with the section above, but the core idea is that you input some data: +Hero (items) (level) (buffs/debuffs) +and get as output some stats. You can then combine these things however you want (ie Hero1 damage > hero2 damage) +or (at what level is Hero1 health > hero2 health). Finally, you could create a new hero, where you could input all of its base stats and abilities, and then treat it like a hero in the game already. + +Errors would generally just occur if the user inputs something that doesn't exist in the game (like giving a hero an item that doesn't exist). ### Expressiveness _What should be easy to do in this language? What should be possible, but difficult? What should be impossible or very difficult?_ +The most important thing to be easy in the language is to specify discrete combinations of heroes and items in DOTA 2 and compare their stats in various ways. Second, it should be relatively easy to make changes to the hypothetical game, and see how those change these interactions. + +It should be possible, but probably difficult to use this to make predictions or serve as a guide for what to do. There are too many factors at play to be able to reccomend things to the player, but if the user were to define some important features, then it should be possible to find builds/heroes that maximize those features, so it should be technically possible. + +Impossible things should be anything unrelated to the game. ### Related work _Are there any other DSLs in this domain? If not, describe how you know there @@ -47,6 +69,7 @@ aren't and conjecture why not. If so, describe them and provide links. How well do they address the need? Are there any particularly admirable qualities of the language? Are there parts of the language you think could be improved?_ +To be completely honest, if this thing exists, I would have heard about it. I follow the dota2 reddit, so if there was a community accessible tester for the game, either as a DSL or a GUI, I'd know. Its possible that one exists for developers of the game, but it would be internal, so of no use to the general population. ## The Project This section examines whether the idea makes for a good CS 111 project. @@ -59,12 +82,18 @@ making language design decisions), as opposed to "systems" aspects of the project (e.g., implementing a complicated semantics that doesn't require a lot of language design)?_ +I think the time spent would be evenly split between figuring out how to make this into a comprehensive language, and doing user studies to figure out what's important to people that's also feasible to calculate outside of the game. The actual calculations the game uses are fairly well-known, so its pretty clear how to make the backend work. However, there would be a good amount of time spent inputting all of the data for the existing heroes, but it would be a one-time setup cost, not a thing to continue devloping over time. ### Scope _How big an idea is this? How ambitious is this project?_ +I think its fairly ambitious. There's a lot of raw data I'd need to collect, as well as a bunch of research that would go into the backend, and the frontend needs to be very, very user-friendly for the average person to be willing to learn it. However, all of this seems very doable, there's nothing in it thats like "wow, I actually don't know how I would do that". Its just a lot of work to be done. ### Benefits and drawbacks _Why might this be a good idea for a project? Why might this not be a good idea project?_ +This would be a very useful tool for a very specific domain. Also, while its a lot of work to input the basic data for the backend, it would also be very easy to just set it up for a subset of the heroes/items. The language could be developed modularly, starting with some data and some output (like just hero damage at first), and then the implementation could grow naturally over time. + +However, the domain is possibly too specific. The majority of people don't know DOTA 2, and of the people who do, many just play it casually, so wouldn't care too much about something thats intended to make them better at the game. There's also a large amount of data that needs to get collected for the thing to even work. + diff --git a/free-2.md b/free-2.md index 2db7764..9d028c1 100755 --- a/free-2.md +++ b/free-2.md @@ -11,34 +11,55 @@ _What need is met by your idea? Who are you helping? What is that person's experience like now? What would their experience be like if you could help them?_ +This language would serve latex users, helping them figure out how to do what they want mathematically in latex's language. + +Latex is hard to learn. There are a ton of commands that you have to google search to be able to write, and you usually have to do this one at a time. Despite this, its still the most widely used math typesetting language that I know of. My idea is for a DSL that lets someone input the mathematical words for the symbols they want to use, and have the language output the latex commands for whatever they said. A language is good for this, as it would essentially be simplified google searching, which is normally what people do (e.g. "floor symbol in latex" would be someone searching for "\lfoor" and "\rfloor"). Thus, a language seems like the natural extension of what this is. + +Additionally, this process only works on one symbol at a time. In my project, you could do something like: + +floor(n over 2) + +and get $\lfloor \frac{n}{2} \rfloor$ as a result. + ### Why a language? _Why is a DSL appropriate for your user(s)? How does it address the need?_ +The need is very simple and domain specific. You need to figure out how to write a symbol in latex, so you ask a language with a simple query syntax and get an answer. Seems self-evident here. ### Why you? _What excites you about this idea? How did you come up with it?_ +First, I came up with this by looking at the reccomended domains section of the project ideas page. Then, I thought about things that I would like out of latex, and the first thing that came to mind was an easier way of finding out how to write what I want. I'm excited by this, because since I write latex a lot, its something that I would actually use. ### Domain _Describe the project's domain in five words._ +Latex symbol syntax lookup helper ### Interface (syntax) _How might the user interact with the language? What does programming look like? Why is this the right way to interact with the problem domain?_ +This is the most important part of this project. If the language isn't intuitive to use, then its no better than latex, as the user would have to look up in the projects documentation how to write what they want to get what they want in latex. Not very useful. The basic idea would be two things. First, a user could specify a mathematical statement in the syntax of the language, and save it as a variable. The language would output the syntax for this, and then save the variable. One could then modify the original variable, so it would look like: +var x = [statement in math language] +> [latex syntax for statement] +var y = x + 2 +> $[latex syntax for statement x] + 2$ +and as such reduce some of the copy-paste work that goes into latexing math. Obviously this example is trivial since adding two to a statement is easy, but if it were something that involved more complex syntax, this could save a lot of time. ### Operation (semantics) _What might happen when a program runs? How does a program interact with the user? What kinds of errors might occur, and how might they be communicated to the user?_ +When the program runs, the user's input would be parsed by an engine that then looks for the symbol that best matches what they asked for. This should be relatively simple. The real issue is if the user looks for something that doesn't exist (or mispells something). Instead of just erroring and breaking, the system should try to "fuzzy match", or find something that the user probably meant. It should then ask for the users input here, probably displaying a list of possible alternatives (a la Google's "did you mean X?"). This output would be hard to do via image, but could be done through text pretty easily. A GUI for this could let you do it via image. ### Expressiveness _What should be easy to do in this language? What should be possible, but difficult? What should be impossible or very difficult?_ +Ideally, any latex query should be easy to do (as long as its in the program's database). Things that are possible but difficult *might* include some level of symbolic manipulation, i.e. simplifying expressions that you give it. This depends on how feasible it is to implement, and how much users want it. ### Related work _Are there any other DSLs in this domain? If not, describe how you know there @@ -46,6 +67,7 @@ aren't and conjecture why not. If so, describe them and provide links. How well do they address the need? Are there any particularly admirable qualities of the language? Are there parts of the language you think could be improved?_ +There are, with the best example being [Detexify](http://detexify.kirelabs.org/classify.html). This site lets you draw a symbol, and it outputs suggestions for what you meant in latex. I use this quite a bit. The issue however, is that it only lets you do one symbol at a time. If you want to compose complex symbols, this is less useful, as you have to deal with the composition syntax yourself. ## The Project This section examines whether the idea makes for a good CS 111 project. @@ -58,12 +80,15 @@ making language design decisions), as opposed to "systems" aspects of the project (e.g., implementing a complicated semantics that doesn't require a lot of language design)?_ +By *far* the most time consuming aspect of this project would be the language issues. Like I said earlier, if this language isn't as intuitive to use as possible, its just another layer of indirection above latex, which helps nobody. I can imagine *tons* of user study data being necessary to make this work. ### Scope _How big an idea is this? How ambitious is this project?_ +The idea itself is pretty small. There are more ambitions extensions of it, like symbolic manipulation, but the overall concept is very doable. The challenge is entirely in getting it to be something that people want to use. Making it work on a systems level should be quite easy relative to my last idea. ### Benefits and drawbacks _Why might this be a good idea for a project? Why might this not be a good idea project?_ +This is something that, if done right, could be very very useful. Additionally, its entirely a question of the language design itself, so its perfect for the class goals. However, there is a very very good chance that it will just fail, and end up being useless to people, or that its simply not possible to make something like this work. diff --git a/free-3.md b/free-3.md index 76c3187..807175f 100755 --- a/free-3.md +++ b/free-3.md @@ -1,43 +1,52 @@ # Free project 3 + ## The user and a language This section describes who the project would serve and why a language might be a good way to meet their needs. - + ### What's the need? _What need is met by your idea? Who are you helping? What is that person's experience like now? What would their experience be like if you could help them?_ +This language would serve people playing board games or card games who want to know what decision to make. The idea of doing this in a language is to enable the users to specify their own games, with their own rules and win conditions. Thus, the user would be able to both query the language for what decision to make, as well as specify the game they are playing. + +Card games and board games are very serious among some people, and arguments among these people take place pretty often. Having a tool that can be run hypothetically in many different scenarios would be very useful. As of now, the player would have to do things like approximate probability calculations in their heads. This tool would make that a little bit simpler, just by automating the things that can be automated with the information the player has. ### Why a language? _Why is a DSL appropriate for your user(s)? How does it address the need?_ +A DSL for this seems pretty natural, as languages are often the best way to specify a new type of thing. Additionally, once this exists, a game object, or class, or data file can simply be queried in some familiar language syntax to get results. The domain can be very specific, as its literally just for specifying games and asking questions about them. ### Why you? _What excites you about this idea? How did you come up with it?_ +Card games was on the list of suggested domains, and since I like card games a lot, I figured it would be interesting to think about DSLs that could make card games either easier or more interesting. This sort of would do both, as it would be a way to assist decision making, as well as consider interesting scenarios in an arbitrary game. ### Domain _Describe the project's domain in five words._ - +Game specification and decision making ### Interface (syntax) _How might the user interact with the language? What does programming look like? Why is this the right way to interact with the problem domain?_ +There would be two main interactions with the language. First, the user would write what a game looks like, probably using object oriented notation, as it makes the most sense for this domain. Second, the user would select a game, input all of the known information, and ask questions (like, my hand is (x,y,z), what should I play to maximize my chances of Q). ### Operation (semantics) _What might happen when a program runs? How does a program interact with the user? What kinds of errors might occur, and how might they be communicated to the user?_ +When a program is run, it should basically do some simple AI techniques (probably just an expectimax search) with the parameters specified by the user in both the game and the current query. In terms of errors, the obvious case for an error is when there isn't enough information for the engine to run a search. In this case, there are two options. First, the program should tell the user this, and ask for any additional information. Second, if the user cannot give any, it should let the user know that it can't answer the question, and terminate "gracefully". ### Expressiveness _What should be easy to do in this language? What should be possible, but difficult? What should be impossible or very difficult?_ +It should be as easy as possible to specify the game rules for whatever game you want. This has already been done, so I think its reasonable. It should also be as easy as possible to specify the current game state. Things that are possible but difficult probably include very advanced inference, where the user asks the game to make a decision based on his/her own strategies/playstyle. This would have to somehow be included in the values for different plays, so it would be hard to do, but theoretically possible. ### Related work _Are there any other DSLs in this domain? If not, describe how you know there @@ -45,6 +54,7 @@ aren't and conjecture why not. If so, describe them and provide links. How well do they address the need? Are there any particularly admirable qualities of the language? Are there parts of the language you think could be improved?_ +In terms of the game creation step, there is one DSL called [zillions of games](http://www.zillions-of-games.com/) that lets users specify the rules for board games. I'd plan on looking at their documentation for ideas, and extending it to card games. In terms of decision assistants, there are certainly bots that do this kind of thing in different games (e.g. Hearthstone, and more recently Dota 2), but its not really publicly available as a language, and is mostly for video game versions of specific games (like checkers, since its solved). ## The Project This section examines whether the idea makes for a good CS 111 project. @@ -57,12 +67,15 @@ making language design decisions), as opposed to "systems" aspects of the project (e.g., implementing a complicated semantics that doesn't require a lot of language design)?_ +I suspect, but am not sure, that the bulk of this project would be the language decisions. Giving users the flexibility to design their own games, but also making an engine that works for all of these specifications would be very tricky. The engine itself would be fairly simple, expectimax is pretty easy to write. ### Scope _How big an idea is this? How ambitious is this project?_ +The main issue is here. This project feels like 2 different DSLs. I'm not sure exactly how much work each one would take, but it does seem like it might be too ambitious. ### Benefits and drawbacks _Why might this be a good idea for a project? Why might this not be a good idea project?_ +The main reason this would be a good idea is that its an interesting exercise in making something with a ton of flexibility have enough specificity that an engine can run queries on it. This would be a perfect exercise in design decisions. However, like I said, the scope might be a little much, and I'm not sure its feasible. diff --git a/no-computer.md b/no-computer.md index df7f820..66b81df 100755 --- a/no-computer.md +++ b/no-computer.md @@ -6,39 +6,47 @@ This section describes who the project would serve and why a language might be a good way to meet their needs. + ### What's the need? _What need is met by your idea? Who are you helping? What is that person's experience like now? What would their experience be like if you could help them?_ +Grading a problem set for a math or science class can be tricky and subjective. How do you determine how many points an incorrect solution gets? Graders have to use inuition to determine how close they are to a solution. Rubrics are essentially a DSL for grading, as they remove some of the subjectivity of this process. With rubrics, someone simply references the part of the problem set on the rubric, and reads off the points to give. ### Why a language? _Why is a DSL appropriate for your user(s)? How does it address the need?_ +The rubric itself is a simple language, only specifyin the amount of points to give someone for various different types of answers. Its a language because it has its own grammar rules of how to specify parts of a problem, breaking it down, and giving each a point value. It addresses the users needs by removing the subjective element of decision making. ### Why you? _What excites you about this idea? How did you come up with it?_ +I grade classes. In Algs grading, we always create a detailed rubric for each problem, so we don't have to carefully read each part of the problem, but can just look for the parts we care about and input the corresponding grades. ### Domain _Describe the project's domain in five words._ +Problem set grading breakdown system ### Interface (syntax) _How might the user interact with the language? What does programming look like? Why is this the right way to interact with the problem domain?_ +The user interacts essentially with a table of problem part to point values. The programming language is the rubric, and a program is the problem set. To program is to map the parts of the problem set to the rubric. This is the simplest way to interact with the domain, because it breaks each problem into logical parts, so if someone answers part of the problem, but not all, you can pick out which parts they did and give the corresponding points. ### Operation (semantics) _What might happen when a program runs? How does a program interact with the user? What kinds of errors might occur, and how might they be communicated to the user?_ +When a program runs, the user acts as the computer, breaking down the problem into its syntactic parts, and consulting the language (the rubric) for rules for how to interpret each part. It outputs a number. Errors occur when something isn't in the rubric. The grader uses judgement here, leaving a note (usually "good start" or "see sample solution", the standard error messages in this domain). ### Expressiveness _What should be easy to do in this language? What should be possible, but difficult? What should be impossible or very difficult?_ +This language makes it very easy to grade problems that break down into the logical parts. Its very difficult, but still possible, to use it to grade problems that don't follow the logical parts using judgment and interpretations of the problem set. Its impossible to use it to do things other than grading. ### Related work _Are there any other DSLs in this domain? If not, describe how you know there @@ -46,6 +54,7 @@ aren't and conjecture why not. If so, describe them and provide links. How well do they address the need? Are there any particularly admirable qualities of the language? Are there parts of the language you think could be improved?_ +Other methods of grading exist, but this one is the most common. ## The Project This section examines whether the idea makes for a good CS 111 project. @@ -58,12 +67,15 @@ making language design decisions), as opposed to "systems" aspects of the project (e.g., implementing a complicated semantics that doesn't require a lot of language design)?_ +I'm not sure how to answer this, seeing as rubrics for grading are already a thing, and aren't valid CS 111 projects. ### Scope _How big an idea is this? How ambitious is this project?_ +Same as previous question ### Benefits and drawbacks _Why might this be a good idea for a project? Why might this not be a good idea project?_ +Same as previous question. \ No newline at end of file