Skip to main content

Daniel, Week 6

Pittsburgh is a beautiful city, at least the part I'm living in. The streets of my neighborhood, lined with stores, a mix of antique restaurants and contemporary fashion salons, feel so fresh, clean, and perhaps even a little romantic at dusk.

That's what I felt about my project when I finally created a working animation of my grid, minus the romantic part. I took Mr. Corica's suggestion on repeatedly drawing the graph during the algorithm's execution to simulate live animation. New versions of the graph would draw over previous versions so quickly that to the human eye, it would seem as if every iteration of my code's draw function only adds newer elements to the graph. To make this happen would, of course, also require a wait function that runs in between iterations, as otherwise only the final state of the graph would be observable. Javascript is a single-threaded language, so it doesn't offer a built-in sleep function that pauses the code without killing the entire browser. My first solution attempt was a sort-of self-loop, a loop that calls itself with a working timer in between iterations. However, the loop had to be hardcoded and I couldn't find a way to break out of it once A*'s termination requirement was met (either having reached the end state or having filled the entire graph without finding an end state). Luckily, my second solution worked. I used an asynchronous function, denoted by the keyword "async", to run the main function of my code. This allowed for a simple custom-made sleep function to work, called upon in the async function and preceded by the keyword "await". Once the timer problem was solved, I had a graph that could display any square dimension (limited only by runtime efficiency, 100 x 100 blocks gets a little slow), have any start and end blocks, a changeable weight to scale A*'s efficiency, and animated blocks of different colors flow through the graph to visualize the algorithm's execution.

The last thing needed was to actually chart the shortest path produced by the algorithm. My version of the algorithm does not actually keep track of the shortest path during its execution. Rather, it looks for the most optimal way to reach the end block in a non-linear fashion, meaning the algorithm might explore multiple different blocks across the graph at the same time. Since I did record all the blocks that the algorithm at one point deemed the lowest minimum value (closest to the end) in a boolean array, generating the shortest path simply required backtracking from the end block to the start block by repetitively finding the next adjacent block with a true value in the boolean array that is closest, of the previous block's neighbors, to the start.

After producing what is, in my opinion, a good looking animated graph with cool colors, I met with Dr. Likhachev again. For my remaining time at the lab, I will be working on creating the same animation feature for ARA*, an improved and more efficient version that Dr. Likhachev himself wrote years back.

Comments

  1. Sounds like you are making a breakthrough with your work! Will be interesting to see your results in the fall.

    ReplyDelete

Post a Comment

Popular posts from this blog

Kylie Heering, Week 2 at the Goldstein Lab

We started off our week with a congratulatory acai bowl trip to celebrate Preston’s acceptance into a training grant program. Acai bowls in California top Playa Bowls (no question about it). From what I can tell, its a pretty huge honor to be recognized by this grant, but he’s really humble about it. On Monday, Preston and I decided that testing antibodies that have never been tested on prostate epithelial cells before would be a good objective for my first Western blot on my own. We needed to probe for ASCT2, a glutamine transporter, and GLS in order to determine if their corresponding antibodies are functional. Antibodies are crucial for Western blots because they bind to the protein of interest (POI), allowing for us to qualify its expression after imaging. As such, Preston wanted to make sure they worked by probing for ASCT2 and GLS on three different cell lines. Cell lines are commercially purchased human cells that have been immortalized (modified to grow indefinitely) by telome...

Alan - First Week at UCSF

Hi Everyone! After arriving in San Francisco last Sunday, I spent this past week settling into the downtown Berkeley apartment that I’ll be sharing with Rohit for the next couple of months, as well as learning my way around the Roy lab at UCSF. First day at the lab was really exciting. Here are a couple pictures of the Mission Bay campus, which was completed just a few years ago. Everything is super new and modern, and there’s still construction for other buildings going on around the campus. Most of the people who work at the Mission Bay campus are either professional researchers or doctors/nurses for the nearby hospital. The graduate students take most of their classes at the original Parnassus campus (where Maya is). I work in Byers Hall, which is connected to Genentech Hall and a short walk down the block from the shuttle stop. There are three other volunteers working for the Roy lab this summer – Kimmai, David, and Pujita, who are all undergrad college students...

Jaewon Oh - Week 7 and 8

Finally done here with my experience and I wish I had more time keep researching so that I have something a little more "finalised" to present. But I guess that's what past EXP kids meant when they said that 8 weeks of research is not enough and I'll have to work with what I've got. To solve the problem of not having enough data points, we used the online TCGA database for raw data that would be used to calculate mutation rates. Mutation rates were calculated through an R coding script that Dr. Cannataro had made. Because the mutation rates were tumor specific, we had to change the proportions that were obtained from the IARC database using data from another database called cBioPortal. Basically we had to multiply the number of times a certain variant was seen in the IARC database by the percentage of tumors that have a tp53 mutation, because our mutation rates are calculated across all tumors in specific cancers (confusing, I know). After graphing the mutatio...