Nicholas+Russell

2015-2016: Oct 27, 2015 Over the past few days of class, we have reached the last chapter of the Intelitek Android tutorial. We have been taking our time with reviewing this last chapter because it contains very important information about how to control the robot autonomously. The chapter covers how to use motor encoders to get and set the positions of the motors, which is vital for telling the robot where to go and knowing where the robot currently is. The autonomous period of the match is entirely dependent on the op-mode giving instructions of what the robot to do when the motors are at certain positions. We have also been taking our time on reviewing state machines. These are very useful for autonomous programs because they essentially make flow-charts that the robot can follow to make decisions when certain conditions are met. This is also important for avoiding loops, which will cause errors. Loops cause errors in the op-modes because the body of the code is written as the method "loop". The robot calls this method every tick so running a loop within the method will prevent the robot from continuing.

At our Robotics meetings, our coach has been guiding us and some of our less experienced team members through the basics of writing the code. This is all repetitive for us since we have covered most of what he is teaching in the online tutorial, but we are going to get move advanced practice assignments to work on. Since we have now have Android Studio installed on the computer we use for independent study, we will be able to work on the practice assignments during this class. Also, once we have our robot functioning, we will be able to write the programs during this class, save the code, and take it to our meetings for it to be tested and tweaked.

Oct 15, 2015 For the last two weeks, we have continued working through the Intelitek tutorial. We have now covered the course up through lesson 15 and there are only three more lessons left for us to cover. After these last lessons, we will begin to finalize our strategy and begin making the code for the robot in Android Studio. Since we still don't have a functioning robot, we will have to start with the basic bases of the programs.

We attended a programming workshop on Saturday, October 3, at the Penn State campus at Great Valley.There was a basic class for those who were new to programming and still had to set-up their hardware, and there was an advanced class for those who were ready to write code. The advanced class at the workshop was ran by one of our coaches, Mr. Hildebrandt. We learned about how to write simple code for the autonomous and tele-op op-modes. The class also covered how to transfer the programs from the computer to the robot controller and how to run the programs using the driver station. We will still need to learn some more of the complex techniques of controlling the robot, but as we practice throughout the year, the new concepts shouldn't be too difficult to learn and implement. After the class and the online course, we are ready to create and transfer op-modes to the robot, now we just need a robot.

Oct 2, 2015 Over the past few weeks, we have learned most of the basic's of how to program the robot for this year. We have used the [|Intelitek Android] course to help us understand the proper syntax and organization of the code. In this course we have reached the tenth section of module three. The first module covers how to set-up the Android phones and the other hardware. The third module covers how to set-up Android Studio to create, transfer the programs to the robot, and how to write tele-op operation modes. We skipped the second module because it explained how to set-up and use App Inventor, which is a graphical, block program for coding the robots, that we don't use.

FTC has also provided a set of sample operation modes that can be downloaded for the teams to use. We have download this and started experimenting with what can be done and how the code should be written. The set includes a blank program called "NullOP" that is basically a skeleton version of the operation modes. This operation mode, each OpMode being a Java class, can be copied and customized for our team's robot. Unfortunately, we don't have functional robot to execute this code on to see how effect our programs are, hopefully we will have one within the next few weeks.

Sept 22, 2015 These past few weeks, our robotics team attended this year's FTC challenge reveal, called the "FTC Kick-Off", at Delaware State University in Dover. This year's challenge is called "Res-Q", it involves mountains at opposite corners of the field. There is a shelter that has buttons that are specific to each team, meaning a color sensor must be used to determine which is the correct button to press. The robot also starts with two climbers in its possession which can be deposited in the shelter for additional points. The robot can park on the mountains, rewarding more points the higher it is parked. These goals must be completed autonomously by the robot during the first 30 seconds of the match. There is an added variable of having debris, plastic cubes and ball, scattered on the field, making movement more unpredictable.

After autonomous, the robot is controlled by the drivers manually. During this period, debris can be pushed into scoring zones on the ground or collected and placed in buckets that are located on the mountains, the higher the bucket, the more points. The mountain also has multiple zip-lines with climbers hanging on them connecting to the shelters. These zip-lines can be triggered to released the climbers for a large amount of points. Finally, during the last 30 seconds, the drivers can trigger "All Clear" signals located at the top of the mountains for additional points. Also, the robot can hang off of the top of the mountain for a massive amount of points. a picture of the field is shown below.

We have also begun thinking of how we want to complete these autonomous goals. We want to accomplish the goals while keeping time and resource efficiency in mind. We won't have a fully functional robot to test with for a while but we will keep strategizing in the meantime. Sept 10, 2015 This year I will be learning and utilizing the techniques for programming a robot for this year's FIRST Tech Challenge (FTC). This is my first year as my team's main programmer and I hope to use time in this class to learn more about how to code the robot. I will using an Android-based Java language to program the robot, which is the supported language for FTC this year. While I already know the basics of Java, I will have to learn what methods to use to control the robot and how to actually write the code in order for it to be implemented. I will be following any tutorials that FTC provides on their website and I will also learn some necessary information about the coding from my coach during robotics practices. One in-depth tutorial I found is at [|ftc.edu.intelitek.com] and I will use it as my main source of information about the system. If I ever have any issues, I can search the FTC forums to help me troubleshoot the problems because there is a large online community that frequently posts about current issues with the challenge.

The robot will run by having an Android phone connected to it, called the robot controller, while the driving team has their own phone, called the driver station, that will have two usb gamepads connect to it. The driver station will contain all the programs that the robot can execute, called op modes, and will send instructions to the robot controller over wi-fi. There are two sections of gameplay during a match, autonomous, during which the robot executes a pre-written program, and tele-op, when the robot is manually controlled by the drivers. I will design and write each of the necessary programs during this class and during practices.

= = =2014-2015: =

Jan 16, 2015 The semester is coming to an end which means my semester of Independent study is also ending. My presentation will be due on Tuesday so I will finish my work over this weekend. I still have a bit of book work left but finishing it over the three-day weekend shouldn't take too long.

Also, I am going to keep working at finding why my game isn't working properly. I have reviewed and rewritten the collision checking function many times but collisions on the top and bottom of map-elements refuse to work. I am trying to find problems with this game by creating a different game along with it. I am remaking the original game of Pong in order to gain more experience with writing simple physics functions and try a different approach of game-making. I hope that creating this other game will expose me to what is going wrong in my original game. I plan on presenting my games and talking about what I've done over the semester as my presentation.

Look back at this course, I have really enjoyed learning what I want at my own pace. I was using this class to stay practiced in the Racket language as well as learn some more of its basics. This year I am learning Java in AP Computer Science and I could tell that spending twice as much time per day programming, I could solve problems using programming logic much easier. While these two languages differ significantly in syntax, the logic of comparing or modifying data is somewhat similar. I also liked being able to learn at my own speed so that I could move through the chapters with confidence that I understood the sections.

I am planning on taking another semester (or two) of independent study next year. Since the school doesn't provide any course past AP computer science, I will use my independent study to expand farther on Java or other programming languages used in the programming industry. I hope that with my senior year independent study there will be a more structured course for me to follow. This year, while I liked the freedom of just using the textbook, I had a few issues with learning new concepts without a teacher to give me lessons or talk through examples. Also, I could tell that having such freedom allowed me to lose focus easily and get off task, but with a more structured course, I feel that deadlines would motivate me to complete what I needed to do.

Overall, I enjoyed this class and I feel that it helped prepare me for a career in computer science by giving me experience with problem-solving and self-education.

Dec 19, 2014 These past days I have been trying to gain more experience with what I have learned in chapter 27, namely, local definitions. I have finished reviewing the exercise problems that are at the end of the chapter and I feel mostly comfortable with this concept. I realized that this technique of using local definitions in a function would, hopefully, increase the efficiency of the function I use to check for collision. The collision-checker takes the player's current position, velocity, and score, and the list of map-element (wall) positions to decide if collision has occurred. Because the walls' position are in a list, the function is recursive to compare the player's information with each wall. The problem with this is that to retrieve the information and compare the necessary values, many functions had to be used in each expression of the conditional function in order to get an product, making the animation stutter and lag. To reduce the amount of function calls, I added the local definitions of the necessary values before the conditional. This way, variables can be compared without a function being called. Also, the local definitions aren't constants like the regular definitions are, these update to proper, current information each time the next map-element is being compared and with each new tick.

Because this is such a large change to the collision-checker, I decided to rewrite the entire function. Not only did I add the local variables, I also had the function compare the wall's position with the border of the player's ball by adding or subtracting it's radius, given the appropriate direction at which the collision may occur. This is too make the animation appear more natural so when the player hits a wall, it doesn't overlap, it ricochets from it's edge. I have also made the function react to a collision by placing the ball it's radius distance away from the wall on the correct side.

After adding all these features, the game is still having many issues that I can't find the source of. For example, at the start of the game, the ball falls directly through the first wall underneath it, but when the ball collides with the top side of the wall next to it, the expect reaction occurs. I will try to diagnose such issues during the next few weeks of Winter Break but I will also keep a large amount of my focus on the textbook, which I am hoping to finish by the end of the semester.

Dec 9, 2014 I have focused most of my attention, these past few days, on the textbook. As I have mentioned, chapter 27 of the textbook covers local definitions (variables, functions, structures, etc.). While the chapter introduced the one new concept of the local function, its application in recursive functions is giving me a challenge. Currently, I am still working through the exercises at the end of the chapter. I really enjoy these problems because I like working through complex tasks and trying to solve any problems that show up with the new techniques. These exercises are cumulative so I review all the past chapters, as well. I am still having a bit of difficulty with some of the more complex recursive functions, but with this practice, I am hoping for a more firm understanding. This recursion could possibly increase the efficiency of my final game, or at least make it more legible so sources of error are easy to spot.

I have also did some experimenting with converting a few methods from the eIMACS Java programming activities into functions in Racket. I am hoping to be fluent in both programming languages by the end of this semester and, like being bilingual in spoken languages, it is important to be able to say the same things or complete the same operations in either.

Over the next few days, I am going to continue working through the exercises and move on through the textbook. I will also continue looking for ways to improve my game with the new content.

Nov 21, 2014 During this last week, I have worked more on completing chapters in the Picturing Programs textbook and on my final project. I have searched extensively but found no video tutorials of these later concepts of the textbook. Fully understanding these concepts might be more difficult for me now, but with enough experimenting, rereading, and searching in the Racket documentation, I should get a sufficient understanding. I had a bit of trouble with experimenting with the exercises in chapter 25 but I feel like I understand enough of the chapter to move on. If I find later that I will need to use multiple recursive data, I will refer back to the chapter.

Chapter 26 was just about the time functions take to complete which made me think about the efficiency of my game. I added a condition to the collision checker to check if the ball is moving right or left and up or down because a collision on the right of a wall can only occur when the ball is travelling left. This change will allow more consistent performance due to less values being checked.

To prevent the ball from entering the walls, I have changed the collision function to check the next position of the ball so proper velocity changes are made before the ball's position is updated to inside the wall. This worked for collisions on the left and right sides of wall but the ball still passes through the top and bottom of the walls. I will have to keep experimenting with the collision function to find the source of the errors. I have also implemented score into the game so the number of flaps used to reach the goal is recorded. Another thing I've added is a conditional in the tick function to stop the ball from rolling when it's x-velocity is low enough. Before, the ball would constantly have a very low absolute value, causing it to roll back and forth slightly.

Along with fixing the collision checker, I want to make the physics seem more natural by including the ball's radius when checking for collisions and placing the ball. Currently, the functions use just the position of the ball, this change will make the ball stay outside of the walls and prevent it from overlapping halfway into the wall.

I have thought about adding the trail to the ball by placing dots in the previous eight or so positions of the ball but I realized that I don't know how to make them disappear after a few ticks. I then thought that this could be fixed by just reversing all the position and velocity changes to the ball eight times and placing the dots there. This could work except it would make much more work for the collision function to check and wouldn't consider any flaps the player made. Chapter 27 of the textbook covers local definitions, which could possibly help me with this issue.

Nov 14, 2014: Over the past two weeks, I have made much progress on refining Flappy Golf, the game. I have made the game able to be scaled to the any reasonable resolution so if the player wants to play in the resolution of their monitor, the height and width of the can be replaced and the rest of the game elements will re-size to stay proportional with the play area. Also, I have separated physics elements into their own variables so the gravity, air resistance, movement strength, and magnitude of rebounding after a collision of the game can be adjusted easier.

I am still finding a few issues with getting the ball to react properly when colliding with a map element. The problem is within my function that checks for collision. Currently, I have the function checking the position of the ball relative to area being covered by the map element. The flaw with this function is that by only checking position, the side from which the ball hit cannot be determined, which makes reflecting the ball inaccurate. I think that by comparing the ball's last position before the collision to it's current position, the direction can be determined, and the ball should rebound properly. I will experiment with this approach over the next few weeks.

I have set a few goals I hope to learn how to implement into my game by when it will be presented. I am still planning on implementing a score system but instead of trying to make such a counter a variable that can be reassigned, I will make score a field in the ball structure. This will require adding the score field to every instance of the a ball structure being constructed but it will allow the number of flaps used to be tracked. Another simple element I am trying to add is a trail that will follow the ball. The issue I am having with this is in having a shape that will show in the ball's past positions for a few ticks, not just one. A few goals I have for later in the development of the game are finding how to run the animation in fullscreen ( without window-borders ) and implementing a user interface. On the interface, I hope to have options to adjust the game physics, input one's name, and have a level selection system.

I have worked through most of chapter 25 in the Picturing Programs textbook but I have realized that trying to learn new material by reading it isn't as effective for me as watching someone explain and show examples in a demonstration. Because of this, I have been searching for a videos that cover these new topics that are outside of the scope of an introductory course. I will use these videos only to supplement what is in the online textbook and I will proceed through it as I normally would, just with some additional assistance to make sure I understand the content.

Oct 27, 2014: Over the last week I have finished the chapter on lists. I took my time with this section since it was one of the last section that was covered in Intro To Computer Science. Understanding lists and how to use them was very important for completing the basics of my game.

I did create the basic draw, tick, and key handlers for the game. I used a list to make positions of where the walls of the course are, then I iterate through the list in my draw and tick functions to place the walls and check for collisions. I have used separate functions for this iteration that I then put into the handlers.

One issue I'm still running into is using variables. I hope that continuing through the Picturing Programs textbooks will alleviate this problem. As it is right now, the game isn't running properly. I think the problem is with the conditional that checks for a collision because the ball stays still no matter what. I will try to refine this program to actually work properly then try to add a counter for score.

I will continue to read through the textbook and see what I can add to improve the game. Another goal I have is to learn how have multiple levels, which I could do by adding another list and changing the positions of the hole and starting place.

Oct 15, 2014: These last two weeks, I have reviewed more of the Picturing Programs textbook and tried to write the functions I'd need for my final project. I have covered the textbook through Chapter 21, covering structures and their use in animations. I have almost reached the point in the book that was reached in the Introduction To Computer Science class. I have begun writing the very basics of my final project. I have quickly realized that what I've already learned will not be enough for me to make this game work.A major problem I've ran into is trying to make functions complete multiple tasks. For my draw-handler, I want the function to place multiple images in multiple spots at the same time but still be able to use the values of their positions to check for collisions. I was thinking this problem could be resolved with the use of a list, but I'm having trouble with making this concept work. Another substantial issue I'm having is with using variables, such as a counter to record the number of key-presses the player used and then using that variable in a function.

I will return to just learning the language, not focusing on the final project until I'm well equipped with knowledge of how to write it. I will pay close attention to the next chapters in the Picturing Programs textbook since I will soon pass the point that was reached in the introductory class. I will also take each section from now on more seriously and spend more time to ensure that I understand everything because I can't treat the chapters like review anymore. Also, I'm considering using the Realm of Racket textbook to complement the Picturing Programs resource. One learning technique I will also try to utilize is video tutorials because I have realized that I learn better by watching then experimenting on my own.

Over the next few weeks, I hope to begin learning many new things that can be used to make my game work properly.

Oct 2, 2014: The last few weeks I have continued reading the Picturing Programs textbook. I have read up to the 17th Chapter, covering about a chapter a day. I've been doing most of the practice problems for each section to help familiarize myself with the syntax of Racket and how to use functions. One main issues I am having is relearning the syntax Dr Racket while learning Java in AP Computer Science. While it is a challenge, I'll need to be able to distinguish between programming languages with a career in programming.

I have also began outlining my final project, Flappy Golf. I have written down notes of what I need to define, what I want in the draw, tick, key, and possibly mouse handlers, as well as the big bang expression. In those notes, I have added some equations and values that I'll need to use when making the program. By writing down what I want to do, I will (hopefully) have an easier time in completing the code with the proper syntax.

Sept 12, 2014: For the first week of my independent study, I reviewed the first 6 chapters of the Picturing Programs: an Introduction to Computer Programming online textbook. I wanted to refamiliarize myself with the format of the DrRacket language. I have been experimenting with some of the basic functions to remember how to manipulate images, design functions, and set up animations. I have read over the textbook and completed the activities to help refresh my memory.

These next few weeks I plan on starting to write the basics of my final project. I will use the textbook as reference to help write the game's source code. I am going to read more about how structures are made and how data can interact in an animation.

Sept 3, 2014: For my independent study, I am learning more about the DrRacket programming language. I chose to study this because I was interested in programming after taking Intro to Computer Science last year and I've always been fascinated by computers. I am hoping to learn more about what is possible with this language (and programming in general). I think this semester will help me decide whether or a not a career in technology is what I would enjoy. To show what I have learn throughout this self-guided course, I will develop a game that will utilize a majority, if not all, of what I've learned about programming.

To study the language I am going to use the official DrRacket guide, "How To Design, Second Edition", " Picturing Programs: An Introduction to Computer Programming". I will periodically read these resources and and try to implement most of of what I learn from them in my final project. At this point I am planning on creating a game similar to the mobile game, Flappy Golf. I expect this to be a valuable learning experience and important in my decision for a career path.